org.dinopolis.gpstool.gpsinput.nmea
Class NMEA0183Sentence

java.lang.Object
  extended byorg.dinopolis.gpstool.gpsinput.nmea.NMEA0183Sentence

public class NMEA0183Sentence
extends java.lang.Object

This class represents a NMEA 0183 sentence as it is sent from a gps receiver or similar devices. See http://www.poly-electronic.ch/dok-gps/nmea-faq.txt for details about this standard.

Version:
$Revision: 1.6 $
Author:
Christof Dallermassl

Constructor Summary
NMEA0183Sentence(byte[] raw_data, int offset, int length)
          Initialize a new NMEA 0183 sentence with the given raw data.
NMEA0183Sentence(char[] raw_data)
          Initialize a new NMEA 0183 sentence with the given raw data.
NMEA0183Sentence(char[] raw_data, int offset, int length)
          Initialize a new NMEA 0183 sentence with the given raw data.
NMEA0183Sentence(java.lang.String raw_data)
          Initialize a new NMEA 0183 sentence with the given raw data.
 
Method Summary
 boolean equals(NMEA0183Sentence object)
           
 boolean equals(java.lang.Object object)
           
 byte getCalculatedChecksum()
          Returns the calculated checksum of this NMEA sentence.
 byte getChecksum()
          Returns the checksum of this NMEA sentence.
 java.util.List getDataFields()
          Returns the data fields of this NMEA sentence.
 java.lang.String getSentenceId()
          Returns the sentence id of this NMEA sentence.
 java.lang.String getTalkerId()
          Returns the talker id of this NMEA sentence.
 boolean isValid()
          Returns true if the sentence is valid (by using the checksum).
static void main(java.lang.String[] args)
           
 java.lang.String toString()
          Returns the string representation of this NMEA sentence.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NMEA0183Sentence

public NMEA0183Sentence(java.lang.String raw_data)
Initialize a new NMEA 0183 sentence with the given raw data. The raw data looks like "$HCHDG,219.5,,,2.5,E*21".

Parameters:
raw_data - the raw data to be parsed.

NMEA0183Sentence

public NMEA0183Sentence(byte[] raw_data,
                        int offset,
                        int length)
Initialize a new NMEA 0183 sentence with the given raw data.

Parameters:
raw_data - the raw data to be parsed.
offset - the offset in the buffer
length - the length

NMEA0183Sentence

public NMEA0183Sentence(char[] raw_data,
                        int offset,
                        int length)
Initialize a new NMEA 0183 sentence with the given raw data.

Parameters:
raw_data - the raw data to be parsed.
offset - the offset in the buffer
length - the length

NMEA0183Sentence

public NMEA0183Sentence(char[] raw_data)
Initialize a new NMEA 0183 sentence with the given raw data.

Parameters:
raw_data - the raw data to be parsed.
Method Detail

getTalkerId

public java.lang.String getTalkerId()
Returns the talker id of this NMEA sentence.

Returns:
the talker id of this NMEA sentence.

getSentenceId

public java.lang.String getSentenceId()
Returns the sentence id of this NMEA sentence.

Returns:
the sentence id of this NMEA sentence.

getDataFields

public java.util.List getDataFields()
Returns the data fields of this NMEA sentence.

Returns:
the data fields of this NMEA sentence.

getChecksum

public byte getChecksum()
Returns the checksum of this NMEA sentence.

Returns:
the checksum of this NMEA sentence.

getCalculatedChecksum

public byte getCalculatedChecksum()
Returns the calculated checksum of this NMEA sentence.

Returns:
the calculated checksum of this NMEA sentence.

isValid

public boolean isValid()
Returns true if the sentence is valid (by using the checksum).

Returns:
true if the sentence is valid (by using the checksum).

equals

public boolean equals(NMEA0183Sentence object)

equals

public boolean equals(java.lang.Object object)

toString

public java.lang.String toString()
Returns the string representation of this NMEA sentence.

Returns:
the string representation of this NMEA sentence.

main

public static void main(java.lang.String[] args)