Geodetic Distance Between Any Two Points On the Earth Spheroid
Based on the Andoyer Algorithm (theoretical accuracy about ±50 meters)
PHP Program by Jay Tanner
1st  LOCATION 2nd  LOCATION
Optional First Place Name / Label


Enter 1st   Latitude ; Longitude   as Deg.ddd   or as D M S
Optional Second Place Name / Label


Enter 2nd  Latitude ; Longitude as Deg.ddd  or as D M S
Coordinates Convention:   Latitude Neg/Pos = South/North     and     Longitude Neg/Pos = West/East
Jay Tanner - 2024
GENERAL INFORMATION

The program's initial default startup values are for Washington, DC, USA
and Paris, France.

This program computes  the geodetic distance between two locations on the
Earth geoid. The maximum theoretical error is on the order of ±50 meters,
but the computed distance is rounded to the nearest ±0.1 (km|mi|nmi).

---------------------------------------------------------------------------
LATITUDE/LONGITUDE CONVENTIONS

The standard longitude convention is Neg/Pos = West/East.

Everyone essentially knows that when we refer to latitudes, positive means
north and negative means south of the equator.  Longitudes are a different
matter and more than one longitude convention can be used.

Although the program was designed with the standard coordinates system in
mind, where negative longitudes are west and positive longitudes are to
the east of Greenwich, if you prefer the opposite convention where east
is negative, then you can use that convention instead. Due to the basic
symmetry of the geoid, either convention will work equally well, so it
doesn't really matter which one you use as long as you're consistent
and apply the same longitude convention to both locations.

---------------------------------------------------------------------------
GEOGRAPHIC COORDINATE FORMATS

Coordinates may be obtained from  https://www.gps-coordinates.net
and copied/pasted directly to this program interface in the same
Lat,Lon format as "+46.789, -76.543" and separated by a comma.

The coordinates may be entered as decimal degrees or as degrees,
minutes and seconds, separated by spaces.  In either case, the
coordinates are separated by a comma and are not restricted to
purely integer values.

EXAMPLES OF VALID COORDINATE VALUES
+123.456789   = D     = 1 element  = Degrees only
+12 34.56     = D M   = 2 elements = Degrees and Minutes
-00 00 12.345 = D M S = 3 elements = Degrees, Minutes and Seconds

For Paris, France, the coordinates could be entered as:
+48.8363889,  +2.3372222
or as
+48 50 11.000,  +02 20 14.000
or as
48 50 11,  2 20 14

NOTE:
Different sources may differ on the precise geographic coordinates of some
major world locations.  Some places are too large to apply a single set of
fixed coordinates. But certain fixed points can serve as benchmarks.

---------------------------------------------------------------------------
UNITS AND BASIC DATA:

UNITS:
1 Statute mile      1.609344 km
1 Nautical mile     1.852 km

EARTH DATA:
Equatorial Radius   6378.137 km  =  3963.191 mi  =  3443.918 nmi
Polar Radius        6356.752 km  =  3949.903 mi  =  3432.372 nmi

Polar Flattening    1/298.257    = 0.003352813
Jay Tanner - 2024