Class MaidenheadLocatorConversion
java.lang.Object
uk.m0nom.adifproc.maidenheadlocator.MaidenheadLocatorConversion
Converted from C# source code by Mark Wickens M0NOM, credits and license below
Copyright (c) 2011, Yves Goergen, ... Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. This class is based on a Perl module by Dirk Koopman, G1TLH, from 2002-11-07. Source: ...
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleCalculate the azimuth in degrees between two locatorsstatic doubleazimuth(org.gavaghan.geodesy.GlobalCoordinates a, org.gavaghan.geodesy.GlobalCoordinates b) Calculate the azimuth in degrees between two locatorsstatic StringcoordsToLocator(org.gavaghan.geodesy.GlobalCoordinates coords) Converts latitude and longitude in degrees to a locatorstatic StringcoordsToLocator(org.gavaghan.geodesy.GlobalCoordinates coords, int len) Convert latitude and longitude in degrees to a locatorstatic doubleCalculate the distance in km between two locatorsstatic doubledistance(org.gavaghan.geodesy.GlobalCoordinates a, org.gavaghan.geodesy.GlobalCoordinates b) Calculate the distance in km between two locatorsstatic booleanisADubiousGridSquare(String grid) static booleanisAWellFormedGridsquare(String locStr) static booleanisEmptyOrInvalid(String gridSquare) static booleanstatic Stringstatic GlobalCoords3DlocatorToCoords(LocationSource source, String locStr) static GlobalCoords3DlocatorToCoords(LocationSource source, String locStr, String extStr)
-
Field Details
-
LOC_4CHAR
-
LOC_6CHAR
-
LOC_8CHAR
-
LOC_10CHAR
-
LOC_12CHAR
-
-
Constructor Details
-
MaidenheadLocatorConversion
public MaidenheadLocatorConversion()
-
-
Method Details
-
isADubiousGridSquare
-
isEmptyOrInvalid
-
isValid
-
locatorToCoords
-
locatorToCoords
-
coordsToLocator
Converts latitude and longitude in degrees to a locator- Parameters:
coords- GlobalCoordinates structure to convert- Returns:
- Locator string
-
locationParserResultToLocator
-
coordsToLocator
Convert latitude and longitude in degrees to a locator- Parameters:
coords- GlobalCoordinates structure to convertlen- Length of the locator (4/6/8/10)- Returns:
- Locator string
-
distance
Calculate the distance in km between two locators- Parameters:
a- Start locator stringb- End locator string- Returns:
- Distance in km
-
distance
public static double distance(org.gavaghan.geodesy.GlobalCoordinates a, org.gavaghan.geodesy.GlobalCoordinates b) Calculate the distance in km between two locators- Parameters:
a- Start GlobalCoordinates structureb- End GlobalCoordinates structure- Returns:
- Distance in km
-
azimuth
Calculate the azimuth in degrees between two locators- Parameters:
a- Start locator stringb- End locator string- Returns:
- Azimuth in degrees
-
azimuth
public static double azimuth(org.gavaghan.geodesy.GlobalCoordinates a, org.gavaghan.geodesy.GlobalCoordinates b) Calculate the azimuth in degrees between two locators- Parameters:
a- Start GlobalCoordinates structureb- End GlobalCoordinates structure- Returns:
- azimuth in degrees
-
isAWellFormedGridsquare
-