You are here

function earth_arclength in Location 7.3

Same name and namespace in other branches
  1. 5.3 earth.inc \earth_arclength()
  2. 5 earth.inc \earth_arclength()
  3. 6.3 earth.inc \earth_arclength()
  4. 7.5 earth.inc \earth_arclength()
  5. 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);
}