Documentation ¶
Overview ¶
Package geo provides functionality for distance calculation between two positions on the Earth. Positions can be provided in two froms: latitude/longitude or as Maidenhead QTH locator. Conversion between latitude/longitude to Maidenhead QTH locator and vice versa is supported in this package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type QTH ¶
type QTH struct { Loc string // Maidenhead QTH Locator LatLon internal.LatLonDeg // LatLon represent a point as a pair of latitude and longitude degrees LatLng s2.LatLng // LatLng represents a point on the unit sphere as a pair of angles. }
QTH represents Maidenhead QTH Locator and associated a pair of latitude and longitude Use function NewQthFromLocator or NewQthFromPosition to create QTH
func NewQthFromLocator ¶
NewQthFromLocator returns QTH for locator. Locator is case-insensitive 2, 4 or 6 characters; example: - JN - jN76 - jn76TO
func NewQthFromPosition ¶
NewQthFromPosition returns QTH for latitude and longitude in decimal degrees
func (QTH) AzimuthTo ¶
AzimuthTo Calculates forward azimuth in decimal degrees from a to b Original Implementation from: http://www.movable-type.co.uk/scripts/latlong.html
func (QTH) DistanceAndAzimuth ¶
DistanceAndAzimuth returns distance in km and azimuth in decimal degrees from a to b