Documentation ¶
Overview ¶
Package locator implements the handling of maidenhead locators (https://en.wikipedia.org/wiki/Maidenhead_Locator_System)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Azimuth ¶
Azimuth calculates the azimuth between two maidenhead locators in degrees. See http://www.movable-type.co.uk/scripts/latlong.html for more details.
func Distance ¶
Distance calculates the great circle distance between two maidenhead locators in kilometers using the haversine formula. See http://www.movable-type.co.uk/scripts/latlong.html for more details.
Types ¶
type Locator ¶
type Locator [8]byte
Locator represents a maidenhead locator with up to four pairs of characters. This is equivalent to an accuracy of 500m.
func LatLonToLocator ¶
LatLonToLocator converts latitude and longitude into a maidenhead locator of the given length. The length must be 2, 4, 6, or 8. The returned locator describes a square of the desired precision that contains the given coordinates.