com.partnersoft.gps
Class GPSReading

java.lang.Object
  extended by com.partnersoft.gps.GPSReading
All Implemented Interfaces:
Coggable, java.lang.Cloneable

public class GPSReading
extends java.lang.Object
implements Coggable, java.lang.Cloneable

A reading from an NMEA GPS.

Author:
Paul Reavis Copyright 2004 Partner Software, Inc.

Constructor Summary
GPSReading()
           
GPSReading(Cog state)
           
GPSReading(GPSReading copy)
           
 
Method Summary
 java.lang.Object clone()
           
 double getBearing()
          Bearing is degrees north, winding clockwise.
 double getLatitude()
          Gets the value of latitude
 double getLongitude()
          Gets the value of longitude
 double getVelocity()
           
 double getX()
           
 double getY()
           
 void setBearing(double newBearing)
          Bearing is degrees north, winding clockwise.
 void setLatitude(double argLatitude)
          Sets the value of latitude
 void setLongitude(double argLongitude)
          Sets the value of longitude
 void setVelocity(double newVelocity)
           
 void setX(double newX)
           
 void setY(double newY)
           
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 java.lang.String toString()
           
 XyPoint toXyPoint()
          Returns the (x, y) values as an XyPoint.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GPSReading

public GPSReading(GPSReading copy)

GPSReading

public GPSReading()

GPSReading

public GPSReading(Cog state)
Method Detail

toCog

public Cog toCog()
Description copied from interface: Coggable
Returns the complete internal state of this object in the form of a Cog.

Specified by:
toCog in interface Coggable
Returns:
Cog representing the internal state of this object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getLatitude

public double getLatitude()
Gets the value of latitude

Returns:
the value of latitude

setLatitude

public void setLatitude(double argLatitude)
Sets the value of latitude

Parameters:
argLatitude - Value to assign to this.latitude

getLongitude

public double getLongitude()
Gets the value of longitude

Returns:
the value of longitude

setLongitude

public void setLongitude(double argLongitude)
Sets the value of longitude

Parameters:
argLongitude - Value to assign to this.longitude

getBearing

public double getBearing()
Bearing is degrees north, winding clockwise.


setBearing

public void setBearing(double newBearing)
Bearing is degrees north, winding clockwise.


getVelocity

public double getVelocity()

setVelocity

public void setVelocity(double newVelocity)

getX

public double getX()

setX

public void setX(double newX)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getY

public double getY()

setY

public void setY(double newY)

toXyPoint

public XyPoint toXyPoint()
Returns the (x, y) values as an XyPoint.

Returns: