Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HaversineDistance ¶
HaversineDistance returns the distance (in miles) between two points of
a given longitude and latitude relatively accurately (using a spherical approximation of the Earth) through the Haversin Distance Formula for great arc distance on a sphere with accuracy for small distances
point coordinates are supplied in degrees and converted into rad. in the func
func VincentyDistance ¶
VincentyDistance computes the distances between two georgaphic coordinates
Args:
p1: the 'starting' point, given in latitude, longitude as a Coord struct p2: the 'ending' point
Returns:
A 3 element tuple: distance between the 2 points given in (1) miles and (2) kilometers The 3rd element will return true upon a successful computation or false if the algorithm fails to converge. -1, -1, false is returned upon failure
Types ¶
Click to show internal directories.
Click to hide internal directories.