Package uk.m0nom.adifproc.geodesic
Class GeodesicUtils
java.lang.Object
uk.m0nom.adifproc.geodesic.GeodesicUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareCoordsEqual(org.gavaghan.geodesy.GlobalCoordinates myCoords, org.gavaghan.geodesy.GlobalCoordinates coords) Check that coordinates are equal or at least very closestatic doublecalculatePath(List<GlobalCoords3D> path, List<PropagationApex> bounces, GlobalCoords3D start, GlobalCoords3D end, double initialAzimuth) static doublegeodesicDistanceToStraightLineDistance(double geodesicDistance) It is assumed the Earth is round for this calculation, so there will be a margin of error.static DoublegetBearing(org.gavaghan.geodesy.GlobalCoordinates myCoordinates, org.gavaghan.geodesy.GlobalCoordinates coordinates)
-
Constructor Details
-
GeodesicUtils
public GeodesicUtils()
-
-
Method Details
-
calculatePath
public static double calculatePath(List<GlobalCoords3D> path, List<PropagationApex> bounces, GlobalCoords3D start, GlobalCoords3D end, double initialAzimuth) -
geodesicDistanceToStraightLineDistance
public static double geodesicDistanceToStraightLineDistance(double geodesicDistance) It is assumed the Earth is round for this calculation, so there will be a margin of error. As the result is used in a calculation of angle shown to the nearest degree, it's probably OK for now This calculates the straight line distance between two points on the Earth, through the Earth, using the geodesic distance on the surface of the Earth.- Parameters:
geodesicDistance- distance between two points traversing across the Earth surface- Returns:
- straight line distance between two points, direct, through the Earth.
-
areCoordsEqual
public static boolean areCoordsEqual(org.gavaghan.geodesy.GlobalCoordinates myCoords, org.gavaghan.geodesy.GlobalCoordinates coords) Check that coordinates are equal or at least very close- Parameters:
myCoords- my coordinatescoords- their coordinates- Returns:
- true if the latitude and longitude are within 0.0001 of each other
-
getBearing
public static Double getBearing(org.gavaghan.geodesy.GlobalCoordinates myCoordinates, org.gavaghan.geodesy.GlobalCoordinates coordinates)
-