MaidenheadLocator class

Converting between Maidenhead locator (used in amateur radio) and latitude/longitude, and calculating of distance and bearing.

This class provides methods for converting between Maidenhead Locators and Latitude/Longitude in degrees as well as for calculating the distance and bearing between two positions. This type of locator is mainly used in amateur radio and sometimes also called “QRA locator”.

This class is based on a Perl module by Dirk Koopman, G1TLH.

Compatibility: .NET Version 2.0 or newer

Maidenhead-Locator-Berechnung in Pascal? Weiter zur Locator-Entfernungsberechnung…

Beispiel

Der folgende Beispielcode zeigt, wie die Entfernung zwischen zwei Locator-Angaben berechnet werden kann:

// Define two locator positions
string homeLoc = "JN59MN"
string destLoc = "JO63DH"

// Compute distance [km] and direction [°]
double distance = MaidenheadLocator.Distance(homeLoc, destLoc);
double azimuth = MaidenheadLocator.Azimuth(homeLoc, destLoc);

// Convert locator to latitude/longitude
LatLong homeLL = MaidenheadLocator.LocatorToLatLong(homeLoc);

// Convert latitude/longitude to locator
string myLoc = MaidenheadLocator.LatLongToLocator(49.57, 11.08);

Download

MaidenheadLocator.cs10.4 KiBQuelltext der MaidenheadLocator-Klasse

Änderungen

2011Aug4
Höhere Genauigkeit der Locatorangabe (1 oder 2 zusätzliche Ebenen).

Licence and terms of use

This software is released under the terms of the simplified BSD licence. You can find the detailed terms and conditions in the download.

Statistic data

  • Updated on 2011-08-04, created on 2007-04-02.
  • First used in ARLog: Amateur Radio Logbook.
  • Ca. 100 lines of code, estimated development costs: 100 - 400 €