Template:Great circle distance/doc

Usage
Computes the great circle distance between two points, specified by the latitude and longitude, using the haversine formula.

or


 * ,,  , and   are the coordinates of your point. They should be specified as decimal degrees, not in degree-minute-second (DMS) notation, and South and West latitude and longitude should be expressed as negative numbers. You can use Decdeg to convert from DMS to decimal notation (e.g.  yields ).


 * The   parameter defaults the average radius of the earth between the latitudes of the input coordinates (using Great circle distance/er). Because the earth is an ellipsoid, not a perfect sphere, the further your points are from each other, the less accurate your answer will be. You can substitute this value for the radius at your midpoint, if known, or use any other value (for example, you could use 3390 if you want distances on Mars, or 6371 if you want to use the mean earth radius).


 * can be any unit recognized by Template:Convert.


 * uses the same syntax as the unnamed precision parameter in Template:Convert.

TemplateData
{	"params": { "r": { "aliases": [ "5"			],			"label": "Radius", "description": "Radius of the planet in kilometers", "type": "number", "default": "6373" },		"lat2": { "aliases": [ "3"			],			"label": "Latitude 2", "description": "Latitude of point 2 in decimal degrees", "type": "number", "default": "0", "required": true },		"lat1": { "aliases": [ "1"			],			"label": "Latitude 1", "description": "Latitude of point 1 in decimal degrees", "type": "number", "default": "0", "required": true },		"long2": { "aliases": [ "4"			],			"label": "Longitude 2", "description": "Longitude of point 2 in decimal degrees", "type": "number", "default": "0", "required": true },		"long1": { "aliases": [ "2"			],			"label": "Longitude 1", "description": "Longitude of point 1 in decimal degrees", "type": "number", "default": "0", "required": true },		"units": { "label": "Units", "description": "Units to output distance in (defaults to km). Can be any distance unit supported by Template:Convert", "type": "string", "default": "km" }	},	"description": "Computes the great circle distance between two points, specified by the latitude and longitude, using the haversine formula.", "paramOrder": [ "lat1", "long1", "lat2", "long2", "r", "units" ] }