Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static calculateBearing(from: PlaneData, to: PlaneData) {
if (!from) return 0;
if (from.longitude === to.longitude && from.latitude === to.latitude) {
throw new Error('No bearing');
}
return geolib.getRhumbLineBearing(from, to);
}
static calculateBearing(from, to) {
if (!from) return 0;
if (from.longitude === to.longitude && from.latitude === to.latitude) {
throw new Error('No bearing');
}
return geolib.getRhumbLineBearing(from, to);
}