edu.hkust.afchecker.data
Class GPSCoordinate

java.lang.Object
  extended by edu.hkust.afchecker.data.GPSCoordinate

public class GPSCoordinate
extends java.lang.Object

Author: Andrew
File history: Created on July 22, 2011. Last update on Oct. 3, 2012
Description: GPS coordinates include latitude, longitude and altitude


Constructor Summary
GPSCoordinate(double lat, double lon, double alt)
          constructor
 
Method Summary
static double dist(GPSCoordinate loc1, GPSCoordinate loc2)
          compute the distance between two GPS coodinates ignoring the altitudes
 double getAltitude()
          get the altitude
static double getGPSPrecision()
          get the precision level of the GPS sensor
 double getLatitude()
          get the latitude value
 double getLongitude()
          get the longitude
 void setAltitude(double alt)
          set the altitude to alt
static void setGPSPrecision(double precision)
          set the tolerable precision level for GPS
 void setLatitude(double lat)
          set the latitude to lat
 void setLongitude(double lon)
          set the longitude to lon
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPSCoordinate

public GPSCoordinate(double lat,
                     double lon,
                     double alt)
constructor

Parameters:
lat - latitude
lon - longitude
alt - altitude
Method Detail

setLatitude

public void setLatitude(double lat)
set the latitude to lat

Parameters:
lat -

getLatitude

public double getLatitude()
get the latitude value

Returns:
latitude

setLongitude

public void setLongitude(double lon)
set the longitude to lon

Parameters:
lon -

getLongitude

public double getLongitude()
get the longitude

Returns:
longitude

setAltitude

public void setAltitude(double alt)
set the altitude to alt

Parameters:
alt -

getAltitude

public double getAltitude()
get the altitude

Returns:
altitude

getGPSPrecision

public static double getGPSPrecision()
get the precision level of the GPS sensor

Returns:
precision in meters

setGPSPrecision

public static void setGPSPrecision(double precision)
set the tolerable precision level for GPS

Parameters:
precision - precision in meters

dist

public static double dist(GPSCoordinate loc1,
                          GPSCoordinate loc2)
compute the distance between two GPS coodinates ignoring the altitudes

Parameters:
loc1 -
loc2 -
Returns:
meters between two locations