org.geonames.utils
Class Bearing

java.lang.Object
  extended by org.geonames.utils.Bearing

public class Bearing
extends Object

compass bearing from the first point to the second point in degrees.

Author:
Marc Wick

Constructor Summary
Bearing()
           
 
Method Summary
static double calculateBearing(double lat1, double lng1, double lat2, double lng2)
          Returns the direction from the first point to the second point in degrees.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bearing

public Bearing()
Method Detail

calculateBearing

public static double calculateBearing(double lat1,
                                      double lng1,
                                      double lat2,
                                      double lng2)
Returns the direction from the first point to the second point in degrees. The direction is the clockwise angle between the magnetic north and the direction from point1 to point2

Parameters:
lat1 -
lng1 -
lat2 -
lng2 -
Returns: