earth-radius-at-geodetic-latitude
Advanced tools
Comparing version 1.0.0 to 1.0.1
19
index.js
@@ -1,17 +0,3 @@ | ||
/** | ||
* Estimate the Earth radius at given latitude. | ||
* | ||
* This function is based on the equation discussed on this GIS Stack Exchange thread: | ||
* http://gis.stackexchange.com/questions/20200 | ||
* And this wikipedia entry on Geocentric Earth radius: | ||
* http://en.wikipedia.org/wiki/Earth_radius#Geocentric_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. | ||
* | ||
* @param {Number} latitude The latitude. | ||
* @return {Number} Radius in meters. | ||
*/ | ||
'use strict'; | ||
function earthRadiusAtGeodeticLatitude(latitude) { | ||
@@ -39,3 +25,2 @@ const r_major = 6378137; | ||
module.exports = earthRadiusAtGeodeticLatitude; |
{ | ||
"name": "earth-radius-at-geodetic-latitude", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Estimate the Earth radius at given latitude", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# earth-radius-at-geodetic-latitude | ||
[](https://travis-ci.org/dbrockman/earth-radius-at-geodetic-latitude) | ||
[](https://greenkeeper.io/) | ||
> Estimate the Earth radius at given latitude | ||
@@ -4,0 +7,0 @@ |
47
3830
0
20