jaron.autopilot
Class Navigation

java.lang.Object
  extended by jaron.autopilot.Navigation

public class Navigation
extends java.lang.Object

The Navigation class provides the functionality for navigating a vehicle using navigation waypoints.

Since:
1.2
Version:
1.2
Author:
jarontec gmail com

Constructor Summary
Navigation()
           
 
Method Summary
static double getCourseInDegrees(double lat1, double lon1, double lat2, double lon2)
          Returns the course defined by two coordinates.
static double getCourseInRadians(double lat1, double lon1, double lat2, double lon2)
          Returns the course defined by two coordinates.
static Waypoint getDestinationPoint(Waypoint start, double bearing, double distance)
          Returns the destination point given ba a start point the initial bearing (deg) and the distance (m).
static double getDistanceInMeters(double lat1, double lon1, double lat2, double lon2)
          Returns the distance between two coordinates.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Navigation

public Navigation()
Method Detail

getDistanceInMeters

public static double getDistanceInMeters(double lat1,
                                         double lon1,
                                         double lat2,
                                         double lon2)
Returns the distance between two coordinates.

Parameters:
lat1 - the start latitude in decimal form
lon1 - the start longitude in decimal form
lat2 - the destination latitude in decimal form
lon2 - the destination longitude in decimal form
Returns:
the distance in meters

getCourseInRadians

public static double getCourseInRadians(double lat1,
                                        double lon1,
                                        double lat2,
                                        double lon2)
Returns the course defined by two coordinates.

Parameters:
lat1 - the start latitude in decimal form
lon1 - the start longitude in decimal form
lat2 - the destination latitude in decimal form
lon2 - the destination longitude in decimal form
Returns:
course in radians

getCourseInDegrees

public static double getCourseInDegrees(double lat1,
                                        double lon1,
                                        double lat2,
                                        double lon2)
Returns the course defined by two coordinates.

Parameters:
lat1 - the start latitude in decimal form
lon1 - the start longitude in decimal form
lat2 - the destination latitude in decimal form
lon2 - the destination longitude in decimal form
Returns:
course in degrees

getDestinationPoint

public static Waypoint getDestinationPoint(Waypoint start,
                                           double bearing,
                                           double distance)
Returns the destination point given ba a start point the initial bearing (deg) and the distance (m). Great Circle Navigation: http://williams.best.vwh.net/avform.htm#LL

Parameters:
start - start point as a waypoint coordinate
bearing - bearing in degrees
distance - distance in meters
Returns:
the destination waypoint