org.gavaghan.geodesy
Class GeodeticCalculator

java.lang.Object
  extended by org.gavaghan.geodesy.GeodeticCalculator

public class GeodeticCalculator
extends java.lang.Object

Implementation of Thaddeus Vincenty's algorithms to solve the direct and inverse geodetic problems. For more information, see Vincent's original publication on the NOAA website:

See http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf

Author:
Mike Gavaghan

Constructor Summary
GeodeticCalculator()
           
 
Method Summary
 GlobalCoordinates calculateEndingGlobalCoordinates(Ellipsoid ellipsoid, GlobalCoordinates start, double startBearing, double distance)
          Calculate the destination after traveling a specified distance, and a specified starting bearing, for an initial location.
 GlobalCoordinates calculateEndingGlobalCoordinates(Ellipsoid ellipsoid, GlobalCoordinates start, double startBearing, double distance, double[] endBearing)
          Calculate the destination and final bearing after traveling a specified distance, and a specified starting bearing, for an initial location.
 GeodeticCurve calculateGeodeticCurve(Ellipsoid ellipsoid, GlobalCoordinates start, GlobalCoordinates end)
          Calculate the geodetic curve between two points on a specified reference ellipsoid.
 GeodeticMeasurement calculateGeodeticMeasurement(Ellipsoid refEllipsoid, GlobalPosition start, GlobalPosition end)
           Calculate the three dimensional geodetic measurement between two positions measured in reference to a specified ellipsoid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeodeticCalculator

public GeodeticCalculator()
Method Detail

calculateEndingGlobalCoordinates

public GlobalCoordinates calculateEndingGlobalCoordinates(Ellipsoid ellipsoid,
                                                          GlobalCoordinates start,
                                                          double startBearing,
                                                          double distance,
                                                          double[] endBearing)
Calculate the destination and final bearing after traveling a specified distance, and a specified starting bearing, for an initial location. This is the solution to the direct geodetic problem.

Parameters:
ellipsoid - reference ellipsoid to use
start - starting location
startBearing - starting bearing (degrees)
distance - distance to travel (meters)
endBearing - bearing at destination (degrees) element at index 0 will be populated with the result
Returns:

calculateEndingGlobalCoordinates

public GlobalCoordinates calculateEndingGlobalCoordinates(Ellipsoid ellipsoid,
                                                          GlobalCoordinates start,
                                                          double startBearing,
                                                          double distance)
Calculate the destination after traveling a specified distance, and a specified starting bearing, for an initial location. This is the solution to the direct geodetic problem.

Parameters:
ellipsoid - reference ellipsoid to use
start - starting location
startBearing - starting bearing (degrees)
distance - distance to travel (meters)
Returns:

calculateGeodeticCurve

public GeodeticCurve calculateGeodeticCurve(Ellipsoid ellipsoid,
                                            GlobalCoordinates start,
                                            GlobalCoordinates end)
Calculate the geodetic curve between two points on a specified reference ellipsoid. This is the solution to the inverse geodetic problem.

Parameters:
ellipsoid - reference ellipsoid to use
start - starting coordinates
end - ending coordinates
Returns:

calculateGeodeticMeasurement

public GeodeticMeasurement calculateGeodeticMeasurement(Ellipsoid refEllipsoid,
                                                        GlobalPosition start,
                                                        GlobalPosition end)

Calculate the three dimensional geodetic measurement between two positions measured in reference to a specified ellipsoid.

This calculation is performed by first computing a new ellipsoid by expanding or contracting the reference ellipsoid such that the new ellipsoid passes through the average elevation of the two positions. A geodetic curve across the new ellisoid is calculated. The point-to-point distance is calculated as the hypotenuse of a right triangle where the length of one side is the ellipsoidal distance and the other is the difference in elevation.

Parameters:
refEllipsoid - reference ellipsoid to use
start - starting position
end - ending position
Returns: