function earth_arclength in Location 7.3
Same name and namespace in other branches
- 5.3 earth.inc \earth_arclength()
- 5 earth.inc \earth_arclength()
- 6.3 earth.inc \earth_arclength()
- 7.5 earth.inc \earth_arclength()
- 7.4 earth.inc \earth_arclength()
Earth arclength.
File
- ./
earth.inc, line 104 - Trigonometry for calculating geographical distances. All function arguments and return values measure distances in metres and angles in degrees. The ellipsoid model is from the WGS-84 datum. Ka-Ping Yee, 2003-08-11
Code
function earth_arclength($angle, $latitude = 37.9) {
// Convert a given angle to earth-surface distance.
return deg2rad($angle) * earth_radius($latitude);
}