# earth-radius-at-geodetic-latitude

> Estimate the Earth radius at given latitude

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

## Install

```sh
npm install earth-radius-at-geodetic-latitude
pnpm add earth-radius-at-geodetic-latitude
yarn add earth-radius-at-geodetic-latitude
bun add earth-radius-at-geodetic-latitude
```

## 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 | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | David Brockman Smoliansky |
| Maintainers | dbrockman |
| Keywords | geo |

## Links

- npm: https://www.npmjs.com/package/earth-radius-at-geodetic-latitude
- Repository: https://github.com/dbrockman/earth-radius-at-geodetic-latitude
- Homepage: https://github.com/dbrockman/earth-radius-at-geodetic-latitude#readme
- Issues: https://github.com/dbrockman/earth-radius-at-geodetic-latitude/issues
- npm.io page: https://npm.io/package/earth-radius-at-geodetic-latitude

## Recent versions

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

## README

# earth-radius-at-geodetic-latitude

[![Build Status](https://travis-ci.org/dbrockman/earth-radius-at-geodetic-latitude.svg?branch=master)](https://travis-ci.org/dbrockman/earth-radius-at-geodetic-latitude)
[![Greenkeeper badge](https://badges.greenkeeper.io/dbrockman/earth-radius-at-geodetic-latitude.svg)](https://greenkeeper.io/)

> Estimate the Earth radius at given latitude


## Install

```
$ npm install --save earth-radius-at-geodetic-latitude
```


## Usage

```js
const earthRadiusAtGeodeticLatitude = require('earth-radius-at-geodetic-latitude');

const latitudeNewYork = 40.730610;
earthRadiusAtGeodeticLatitude(latitudeNewYork);
//=> 6377880.978308504

const latitudeNewOrleans = 30.0154753;
earthRadiusAtGeodeticLatitude(latitudeNewOrleans);
//=> 6357371.8965936005
```


This function is based on the equation discussed on [this GIS Stack Exchange thread](http://gis.stackexchange.com/questions/20200) and [this wikipedia entry](http://en.wikipedia.org/wiki/Earth_radius#Geocentric_radius) on Geocentric Earth radius:

The equation:
```
R = ( (a^2 cos(f))^2 + (b^2 sin(f))^2 ) / ( (a cos(f))^2 + (b sin(f))^2 )
```
where `f` is the latitude and `a` and `b` are the equatorial radius and the polar radius, respectively.


## API

### earthRadiusAtGeodeticLatitude(latitude)

Takes latitude (number) and returns an estimate of the Earth radius at that given latitude.

The radius is in meters.

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