Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lejos.devices
Class NMEASentence

    java.lang.Object
      lejos.devices.NMEASentence

    public class NMEASentence

extends Object

An NMEA sentence consists of (in order) a '$' character, some header information, many data fields seperated by ',' a '*' symbol at the end, and a final hexidecimal checksum number (two chars = one byte). e.g. $GPGGA,140819.000,4433.2984,N,08056.3959,W,6,00,50.0,168.7,M,-36.0,M,,0000*53 The first two chars (GP) are the talker id The next 3 characters (GGA) are the sentence id

Author:
  BB

Constructor Summary
`NMEASentence(String sentence)`

Method Summary
`byte` | `calcChecksum()`
`byte` | `getChecksum()`
`Vector` | `getDataFields()`
`String` | `getDataType()` Returns the data type of the NMEA sentence.
`String` | `getPrefix()` Returns the prefix of the NMEA sentence.
`boolean` | `isValid()` Compares the checksum values to see if this is a corrupt sentence
`void` | `setSentence(String sentence)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait`

Constructor Detail

### NMEASentence

    public NMEASentence(String sentence)

Method Detail

### setSentence

    public void setSentence(String sentence)

### getPrefix

    public String getPrefix()

  Returns the prefix of the NMEA sentence. e.g. "GP"

  Returns:
    prefix

### getDataType

    public String getDataType()

  Returns the data type of the NMEA sentence. e.g. "GGA"

  Returns:
    data type

### getDataFields

    public Vector getDataFields()

### isValid

    public boolean isValid()

  Compares the checksum values to see if this is a corrupt sentence

  Returns:
    true iff the checksum is valid

### getChecksum

    public byte getChecksum()

### calcChecksum

    public byte calcChecksum()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD