How to use the geolib.getRhumbLineBearing function in geolib

To help you get started, we’ve selected a few geolib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github foucdeg / airspaces / server / src / UDPListener.ts View on Github external
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);
  }
github foucdeg / x-plane-map-electron / src / udp.js View on Github external
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);
  }

geolib

Library to provide basic geospatial operations like distance calculation, conversion of decimal coordinates to sexagesimal and vice versa, etc. This library is currently **2D**, meaning that altitude/elevation is not yet supported by any of its functions!

MIT
Latest version published 12 months ago

Package Health Score

78 / 100
Full package analysis

Similar packages