New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

geodetic-haversine-distance

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geodetic-haversine-distance

Distance between two latitude/longitude coordinates taking latitude into account

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

geodetic-haversine-distance

Greenkeeper badge

This function calculates the distance in meters between two latitude/longitude coordinates. Instead of using a mean radius of Earth, the radius is estimated using the latitude of the first position.

Install

$ npm install --save geodetic-haversine-distance

Usage

const haversineDistance = require('geodetic-haversine-distance');

const a = { latitude: 59.338746, longitude: 18.060683 };
const b = { latitude: 59.339042, longitude: 18.061779 };

haversineDistance(a, b);
//=> 70.37704048362993

API

haversineDistance(start, end)

Calculate the distance in meters between two positions. The two positions must have the properties latitude and longitude.

Keywords

FAQs

Package last updated on 12 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc