triptracker.client.gps.core
Class NMEASentence

java.lang.Object
  extended by triptracker.client.gps.core.NMEASentence

public class NMEASentence
extends Object

Parser for the GPS NMEA-0183 (National Marine Electronics Association) data protocol. NMEA-0183 data is sent at 4800 baud and the max. length of a sentence is 80 ASCII characters including the leading '$' and the trailing CR LF control characters.


Field Summary
static char CHECKSUM
           
static String CRLF
           
static char DELIMITER
           
static int MAXLENGTH
           
static char START
           
 
Constructor Summary
NMEASentence()
           
NMEASentence(String sentence)
           
 
Method Summary
 String getField(int index)
           
 String getField(String fieldName)
           
 int getFieldCount()
           
 NMEAManufacturerID getManufacturerID()
           
 String getSentence()
           
 NMEASentenceID getSentenceID()
           
 NMEATalkerID getTalkerID()
           
 boolean isChecksumPresent()
           
 boolean isIgnoreChecksum()
           
 boolean isProprietary()
           
 void parseSentence(String sentence)
          Parses the NMEA-0183 sentence.
 void setIgnoreChecksum(boolean ignoreChecksum)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELIMITER

public static final char DELIMITER
See Also:
Constant Field Values

START

public static final char START
See Also:
Constant Field Values

CHECKSUM

public static final char CHECKSUM
See Also:
Constant Field Values

MAXLENGTH

public static final int MAXLENGTH
See Also:
Constant Field Values

CRLF

public static final String CRLF
See Also:
Constant Field Values
Constructor Detail

NMEASentence

public NMEASentence()

NMEASentence

public NMEASentence(String sentence)
Method Detail

parseSentence

public void parseSentence(String sentence)
                   throws IllegalArgumentException
Parses the NMEA-0183 sentence. Fields can then be read from getField(int).

Parameters:
sentence - NMEA-0183 formatted sentence
Throws:
IllegalArgumentException - on malformed sentence
See Also:
getField(int)

getField

public String getField(int index)

getField

public String getField(String fieldName)

getFieldCount

public int getFieldCount()

getTalkerID

public NMEATalkerID getTalkerID()

getSentenceID

public NMEASentenceID getSentenceID()

getManufacturerID

public NMEAManufacturerID getManufacturerID()

getSentence

public String getSentence()

isChecksumPresent

public boolean isChecksumPresent()

isIgnoreChecksum

public boolean isIgnoreChecksum()

setIgnoreChecksum

public void setIgnoreChecksum(boolean ignoreChecksum)

isProprietary

public boolean isProprietary()


Copyright © 2006 Team Trip Tracker. All Rights Reserved.