Documentation ¶
Overview ¶
Package maidenhead implements the Maidenhead Locator System, a geographic coordinate system used by amataur radio (HAM) operators.
Index ¶
- Constants
- type Point
- func (p Point) Bearing(heading Point) float64
- func (p Point) CompassBearing(heading Point) string
- func (p Point) Distance(other Point) float64
- func (p Point) EqualTo(other Point) bool
- func (p Point) GridSquare() (string, error)
- func (p Point) Locator(precision int) (string, error)
- func (p Point) String() string
Constants ¶
const ( FieldPrecision = iota + 1 SquarePrecision SubSquarePrecision ExtendedSquarePrecision )
Precision of the computed locator.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Point ¶
Point is a geographical point on the map.
func ParseLocator ¶
ParseLocator parses a Maidenhead Locator with permissive rule matching.
func ParseLocatorCentered ¶
ParseLocatorCentered parses a Maidenhead Locator with permissive rule matching. Returns Points structure with coordinates of the square center
func ParseLocatorStrict ¶
ParseLocatorStrict parses a Maidenhead Locator with strict rule matching.
func ParseLocatorStrictCentered ¶
ParseLocatorStrictCentered parses a Maidenhead Locator with strict rule matching. Returns Points structure with coordinates of the square center
func (Point) CompassBearing ¶
CompassBearing returns the compass bearing to a heading.
func (Point) EqualTo ¶
EqualTo returns true if the coordinates point to the same geographical location.
func (Point) GridSquare ¶
GridSquare returns a Maidenhead Locator for the point coordinates.