Created
December 5, 2019 01:44
-
-
Save cosinekitty/6c66dc21bb0d9df9c3bec202115d7cbe to your computer and use it in GitHub Desktop.
Convert geodetic latitude to geocentric latitude using WGS 84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GeocentricLatitude(lat) | |
{ | |
// Convert geodetic latitude 'lat' to a geocentric latitude 'clat'. | |
// Geodetic latitude is the latitude as given by GPS. | |
// Geocentric latitude is the angle measured from center of Earth between a point and the equator. | |
// https://en.wikipedia.org/wiki/Latitude#Geocentric_latitude | |
var e2 = 0.00669437999014; | |
var clat = Math.atan((1.0 - e2) * Math.tan(lat)); | |
return clat; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment