KosherJava Zmanim Homepage

net.sourceforge.zmanim.util
Class GeoLocationUtils

java.lang.Object
  extended by net.sourceforge.zmanim.util.GeoLocationUtils

public class GeoLocationUtils
extends Object

A class for various location calculations Most of the code in this class is ported from Chris Veness' LGPL Javascript Implementation

Version:
0.1
Author:
© Eliyahu Hershfeld 2009

Constructor Summary
GeoLocationUtils()
           
 
Method Summary
static double getGeodesicDistance(GeoLocation location, GeoLocation destination)
          Calculate geodesic distance in Meters between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.
static double getGeodesicFinalBearing(GeoLocation location, GeoLocation destination)
          Calculate the final geodesic bearing between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.
static double getGeodesicInitialBearing(GeoLocation location, GeoLocation destination)
          Calculate the initial geodesic bearing between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.
static double getRhumbLineBearing(GeoLocation location, GeoLocation destination)
          Returns the rhumb line bearing from the current location to the GeoLocation passed in.
static double getRhumbLineDistance(GeoLocation location, GeoLocation destination)
          Returns the rhumb line distance from the current location to the GeoLocation passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoLocationUtils

public GeoLocationUtils()
Method Detail

getGeodesicInitialBearing

public static double getGeodesicInitialBearing(GeoLocation location,
                                               GeoLocation destination)
Calculate the initial geodesic bearing between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.

Parameters:
location - the destination location

getGeodesicFinalBearing

public static double getGeodesicFinalBearing(GeoLocation location,
                                             GeoLocation destination)
Calculate the final geodesic bearing between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.

Parameters:
location - the destination location

getGeodesicDistance

public static double getGeodesicDistance(GeoLocation location,
                                         GeoLocation destination)
Calculate geodesic distance in Meters between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.

Parameters:
location - the destination location

getRhumbLineBearing

public static double getRhumbLineBearing(GeoLocation location,
                                         GeoLocation destination)
Returns the rhumb line bearing from the current location to the GeoLocation passed in.

Parameters:
location - destination location
Returns:
the bearing in degrees

getRhumbLineDistance

public static double getRhumbLineDistance(GeoLocation location,
                                          GeoLocation destination)
Returns the rhumb line distance from the current location to the GeoLocation passed in. Ported from Chris Veness' Javascript Implementation

Parameters:
location - the destination location
Returns:
the distance in Meters

KosherJava Zmanim Homepage

Copyright © 2004 - 2010 Eliyahu Hershfeld. All Rights Reserved. Released under the GPL 2 license