org.jscience.devices.gps.garmin
Class PVTDataPacket

java.lang.Object
  extended by org.jscience.devices.gps.garmin.GarminPacket
      extended by org.jscience.devices.gps.garmin.PVTDataPacket
All Implemented Interfaces:
IPosition, ITime

public class PVTDataPacket
extends GarminPacket
implements IPosition, ITime

This class encapsulates the PVT (Position, velocity and time) packet. After receiving a Cmnd_Start_Pvt-packet, the GPS will continually transmit packets of the PVT-type.


Field Summary
protected  float alt
          DOCUMENT ME!
protected  float epe
          DOCUMENT ME!
protected  float eph
          DOCUMENT ME!
protected  float epv
          DOCUMENT ME!
protected  int fix
          DOCUMENT ME!
protected  PositionRadians lat
          DOCUMENT ME!
protected  int leap_scnds
          DOCUMENT ME!
protected  PositionRadians lon
          DOCUMENT ME!
protected  float msl_hght
          DOCUMENT ME!
protected  double tow
          DOCUMENT ME!
protected  float veast
          DOCUMENT ME!
protected  float vnorth
          DOCUMENT ME!
protected  float vup
          DOCUMENT ME!
protected  long wn_days
          DOCUMENT ME!
 
Fields inherited from class org.jscience.devices.gps.garmin.GarminPacket
Cmnd_Abort_Transfer, Cmnd_Start_Pvt_Data, Cmnd_Stop_Pvt_Data, Cmnd_Transfer_Alm, Cmnd_Transfer_Laps, Cmnd_Transfer_Posn, Cmnd_Transfer_Prx, Cmnd_Transfer_Rte, Cmnd_Transfer_Time, Cmnd_Transfer_Trk, Cmnd_Transfer_Wpt, Cmnd_Turn_Off_Pwr, DLE, ETX, packet, Pid_Ack_Byte, Pid_Command_Data, Pid_Date_Time_Data, Pid_Lap, Pid_Nak_Byte, Pid_Position_Data, Pid_Product_Data, Pid_Product_Rqst, Pid_Protocol_Array, Pid_Prx_Wpt_Data, Pid_Pvt_Data, Pid_Records, Pid_Trk_data, Pid_Trk_Hdr, Pid_Wpt_Data, Pid_Xfer_Cmplt, pointer
 
Constructor Summary
PVTDataPacket(GarminPacket p)
          This method is a copy-constructor allowing to "upgrade" a GarminPacket to a PVTDataPacket.
PVTDataPacket(int[] p)
          Treats the packet p as a packet containing PVT-data.
 
Method Summary
 int getHours()
          Returns the hour of the day.
 PositionRadians getLatitude()
          This method returns the latitude of the position.
 PositionRadians getLongitude()
          This method returns the longitude of the position.
 short getMinutes()
          Returns the minute of the hour.
 short getSeconds()
          Returns the second of the minute.
 
Methods inherited from class org.jscience.devices.gps.garmin.GarminPacket
calcChecksum, createBasicPacket, createCommandPacket, getByte, getDataLength, getID, getLength, getPacket, getPointer, getRawPacket, idToString, isLegal, readBoolean, readBoolean, readByte, readByte, readDouble, readDouble, readFloat, readFloat, readLong, readLong, readNullTerminatedString, readNullTerminatedString, readPosition, readPosition, readWord, readWord, setPointer, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

alt

protected float alt
DOCUMENT ME!


epe

protected float epe
DOCUMENT ME!


eph

protected float eph
DOCUMENT ME!


epv

protected float epv
DOCUMENT ME!


fix

protected int fix
DOCUMENT ME!


tow

protected double tow
DOCUMENT ME!


lat

protected PositionRadians lat
DOCUMENT ME!


lon

protected PositionRadians lon
DOCUMENT ME!


veast

protected float veast
DOCUMENT ME!


vnorth

protected float vnorth
DOCUMENT ME!


vup

protected float vup
DOCUMENT ME!


msl_hght

protected float msl_hght
DOCUMENT ME!


leap_scnds

protected int leap_scnds
DOCUMENT ME!


wn_days

protected long wn_days
DOCUMENT ME!

Constructor Detail

PVTDataPacket

public PVTDataPacket(int[] p)
Treats the packet p as a packet containing PVT-data. Throws PacketNotRecognizedException if p is not a PVT-packet. Throws InvalidPacketException if the packet contains too little data.

Parameters:
p - DOCUMENT ME!

PVTDataPacket

public PVTDataPacket(GarminPacket p)
This method is a copy-constructor allowing to "upgrade" a GarminPacket to a PVTDataPacket. Throws PacketNotRecognizedException if p is not a PVT-data-packet.

Parameters:
p - DOCUMENT ME!
Method Detail

getHours

public int getHours()
Returns the hour of the day.

Specified by:
getHours in interface ITime
Returns:
DOCUMENT ME!

getMinutes

public short getMinutes()
Returns the minute of the hour.

Specified by:
getMinutes in interface ITime
Returns:
DOCUMENT ME!

getSeconds

public short getSeconds()
Returns the second of the minute.

Specified by:
getSeconds in interface ITime
Returns:
DOCUMENT ME!

getLatitude

public PositionRadians getLatitude()
This method returns the latitude of the position.

Specified by:
getLatitude in interface IPosition
Returns:
DOCUMENT ME!

getLongitude

public PositionRadians getLongitude()
This method returns the longitude of the position.

Specified by:
getLongitude in interface IPosition
Returns:
DOCUMENT ME!