location
Class GPSInfo

java.lang.Object
  extended bylocation.GPSInfo

class GPSInfo
extends java.lang.Object

Encapsulates inforamation obtained from the GPS receiver.

Version:
2.0
Author:
Chien-Liang Fok

Field Summary
private  LocationDate date
          time stamp information
private  double knots
          speed information
private  Latitude latitude
          latitude information
private  Longitude longitude
          longitude information
private  boolean validity
          The validity of this measurement.
 
Constructor Summary
GPSInfo(GPSInfo info)
          The copy constructor.
GPSInfo(Latitude latitude, Longitude longitude, double knots, LocationDate date, boolean validity)
          The constructor.
 
Method Summary
 LocationDate getDate()
          Returns the date this GPS reading was taken.
 double getKnots()
          Returns the knots of this GPS reading.
 double getKPH()
          Accessor method to get the speed in kilometers per hour stored in this event
 Latitude getLatitude()
          Returns the latitude.
 Longitude getLongitude()
          Returns the longitude.
 double getMPH()
          Accessor method to get the speed in miles per hour stored in this event
 boolean getValidity()
          Returns whether this GPS info contains a valid GPS reading.
 java.lang.String toString()
          Returns a string representation of this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

latitude

private Latitude latitude
latitude information


longitude

private Longitude longitude
longitude information


knots

private double knots
speed information


date

private LocationDate date
time stamp information


validity

private boolean validity
The validity of this measurement.

Constructor Detail

GPSInfo

public GPSInfo(Latitude latitude,
               Longitude longitude,
               double knots,
               LocationDate date,
               boolean validity)
The constructor.


GPSInfo

public GPSInfo(GPSInfo info)
The copy constructor.

Method Detail

getLatitude

public Latitude getLatitude()
Returns the latitude.


getLongitude

public Longitude getLongitude()
Returns the longitude.


getKnots

public double getKnots()
Returns the knots of this GPS reading.


getDate

public LocationDate getDate()
Returns the date this GPS reading was taken.


getValidity

public boolean getValidity()
Returns whether this GPS info contains a valid GPS reading.


getMPH

public double getMPH()
Accessor method to get the speed in miles per hour stored in this event

Returns:
the speed in miles per hour of the host

getKPH

public double getKPH()
Accessor method to get the speed in kilometers per hour stored in this event

Returns:
the speed in kilometers per hour of this host

toString

public java.lang.String toString()
Returns a string representation of this class

Returns:
a string representation of this class