transport.protocol
Class NMEAMessage

java.lang.Object
  |
  +--transport.protocol.Message
        |
        +--transport.protocol.NMEAMessage
All Implemented Interfaces:
java.io.Serializable

public class NMEAMessage
extends Message
implements java.io.Serializable

This class is a NMEAMessage. A NMEAMessage is a GPS position information message. It contains location, heading and even time information pertaining to a specific agent.

See Also:
Serialized Form

Field Summary
private  double heading
          The heading for the receiving agent.
private  double latitude
          The latitude position for the receiving agent.
private  double longitude
          The longitude position for the receiving agent.
private  java.lang.String nmea
          Nmea formatted message string.
private  long time
          The time for the receiving agent.
 
Fields inherited from class transport.protocol.Message
 
Constructor Summary
NMEAMessage(int to, int from, double lat, double lon, double hea, long tim)
          This constructor initializes the nmea message.
NMEAMessage(java.lang.String nmea, int to, int from)
          This constructor initializes the .
 
Method Summary
 double getHeading()
          This method returns the heading of gps coordinate.
 double getLatitude()
          This method returns the latitude of gps coordinate.
 double getLongitude()
          This method returns the longitude of gps coordinate.
 java.lang.String getNmea()
          This method returns the String nmea message.
 long getTime()
          This method returns the time of gps coordinate.
 
Methods inherited from class transport.protocol.Message
getFrom, getTo, setTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nmea

private java.lang.String nmea
Nmea formatted message string.


latitude

private double latitude
The latitude position for the receiving agent.


longitude

private double longitude
The longitude position for the receiving agent.


heading

private double heading
The heading for the receiving agent.


time

private long time
The time for the receiving agent.

Constructor Detail

NMEAMessage

public NMEAMessage(int to,
                   int from,
                   double lat,
                   double lon,
                   double hea,
                   long tim)
This constructor initializes the nmea message.

Parameters:
to - The port the ipaq gps receiver is listening on.
from - The port the ipaq gps receiver is listening on.
lat - The port the ipaq gps receiver is listening on.
lon - The port the ipaq gps receiver is listening on.
hea - The port the ipaq gps receiver is listening on.
tim - The port the ipaq gps receiver is listening on.

NMEAMessage

public NMEAMessage(java.lang.String nmea,
                   int to,
                   int from)
This constructor initializes the .

Parameters:
nmea - The port the ipaq gps receiver is listening on.
to - The port the ipaq gps receiver is listening on.
from - The port the ipaq gps receiver is listening on.
Method Detail

getNmea

public java.lang.String getNmea()
This method returns the String nmea message.

Returns:
String The message.

getLatitude

public double getLatitude()
This method returns the latitude of gps coordinate.

Returns:
double The latitude.

getLongitude

public double getLongitude()
This method returns the longitude of gps coordinate.

Returns:
double The longitude.

getHeading

public double getHeading()
This method returns the heading of gps coordinate.

Returns:
double The heading.

getTime

public long getTime()
This method returns the time of gps coordinate.

Returns:
long The time.