# geodetic-haversine-distance

> Distance between two latitude/longitude coordinates taking latitude into account

Latest version **1.0.1** (published 2017-02-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install geodetic-haversine-distance
pnpm add geodetic-haversine-distance
yarn add geodetic-haversine-distance
bun add geodetic-haversine-distance
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-02-12 |
| First published | 2017-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | David Brockman Smoliansky |
| Maintainers | dbrockman |
| Keywords | geo, haversine, distance, coordinates, latitude, longitude |

## Links

- npm: https://www.npmjs.com/package/geodetic-haversine-distance
- Repository: https://github.com/dbrockman/geodetic-haversine-distance
- Homepage: https://github.com/dbrockman/geodetic-haversine-distance#readme
- Issues: https://github.com/dbrockman/geodetic-haversine-distance/issues
- npm.io page: https://npm.io/package/geodetic-haversine-distance

## Dependencies (1)

- [earth-radius-at-geodetic-latitude](https://npm.io/package/earth-radius-at-geodetic-latitude.md) ^1.0.0

## Recent versions

- 1.0.1 (latest) — 2017-02-12
- 1.0.0 — 2017-02-12

## README

# geodetic-haversine-distance

[![Greenkeeper badge](https://badges.greenkeeper.io/dbrockman/geodetic-haversine-distance.svg)](https://greenkeeper.io/)

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

```js
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`.

---
_Source: https://npm.io/package/geodetic-haversine-distance · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
