node-gps-heading

1.0.1 • Public • Published

Calculates heading / bearing between two GPS locations along the great circle.

Build Status

Install

npm install node-gps-heading --save

Example usage

var gpsHeading = require('node-gps-heading');
 
var gps1 = {
  lat: -31.0000000,
  lng: 115.8480000
}
 
var gps2 = {
  lat: -32.0000000,
  lng: 115.8480000
}
 
gpsHeading.calculate(gps1, gps2, function(heading) {
  console.log(heading.degree);
  console.log(heading.radian);
});
 
var heading = gpsHeading.calculateSync(gps1, gps2);
console.log(heading.degree);
console.log(heading.radian);

Test

npm test

/node-gps-heading/

    Package Sidebar

    Install

    npm i node-gps-heading

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • betaversionsoftware