Created
January 28, 2011 09:35
-
-
Save stefanluptak/800041 to your computer and use it in GitHub Desktop.
Meter to degrees based on Geographical Latitude
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
// Calculates the degree value of 1 meter at given geographical latitude | |
#define EARTH_RADIUS 6371000 | |
- (double)meterToDegreeAtLatitude:(double)aLatitudeInDegrees { | |
double aLatitudeInRadians = aLatitudeInDegrees * (M_PI / 180); | |
return (1 / (cos(aLatitudeInRadians) * EARTH_RADIUS)) * (180 / M_PI); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment