public class NmeaReader extends java.lang.Object implements IGpxReader
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
NmeaReader.GGA
Global Positioning System Fix Data.
|
(package private) static class |
NmeaReader.GLL
Geographic Position - Latitude/Longitude.
|
(package private) static class |
NmeaReader.GSA
GNSS DOP and Active Satellites.
|
private static class |
NmeaReader.NMEAParserState |
(package private) static class |
NmeaReader.RMC
Recommended Minimum Specific GNSS Data.
|
(package private) static class |
NmeaReader.VTG
Course Over Ground and Ground Speed.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) GpxData |
data |
private static java.util.regex.Pattern |
DATE_TIME_PATTERN |
NmeaReader.NMEAParserState |
ps |
private java.text.SimpleDateFormat |
rmcTimeFmt |
private java.io.InputStream |
source |
| Constructor and Description |
|---|
NmeaReader(java.io.InputStream source)
Constructs a new
NmeaReader |
| Modifier and Type | Method and Description |
|---|---|
GpxData |
getGpxData()
Replies the GPX data.
|
int |
getNumberOfCoordinates()
Returns the number of coordinates that have been successfuly read.
|
int |
getParserChecksumErrors() |
int |
getParserMalformed() |
int |
getParserUnknown() |
int |
getParserZeroCoordinates() |
(package private) static boolean |
isSentence(java.lang.String address,
Sentence formatter)
Determines if the given address denotes the given NMEA sentence formatter of a known talker.
|
boolean |
parse(boolean tryToFinish)
Parse the GPX data.
|
private static LatLon |
parseLatLon(java.lang.String ns,
java.lang.String ew,
java.lang.String dlat,
java.lang.String dlon) |
private boolean |
parseNMEASentence(java.lang.String s,
NmeaReader.NMEAParserState ps) |
private java.util.Date |
readTime(java.lang.String p) |
private final java.io.InputStream source
private static final java.util.regex.Pattern DATE_TIME_PATTERN
private final java.text.SimpleDateFormat rmcTimeFmt
public NmeaReader.NMEAParserState ps
public NmeaReader(java.io.InputStream source) throws java.io.IOException
NmeaReadersource - NMEA file input streamjava.io.IOException - if an I/O error occursprivate java.util.Date readTime(java.lang.String p) throws IllegalDataException
IllegalDataExceptionpublic int getParserUnknown()
public int getParserZeroCoordinates()
public int getParserChecksumErrors()
public int getParserMalformed()
public int getNumberOfCoordinates()
public boolean parse(boolean tryToFinish) throws org.xml.sax.SAXException, java.io.IOException
IGpxReaderparse in interface IGpxReadertryToFinish - true, if the reader should return at least part of the GPX
data in case of an error.org.xml.sax.SAXException - if any SAX parsing error occursjava.io.IOException - if any I/O error occursstatic boolean isSentence(java.lang.String address, Sentence formatter)
address - first tag of an NMEA sentenceformatter - sentence formatter mnemonic codetrue if the address denotes the given NMEA sentence formatter of a known talkerprivate boolean parseNMEASentence(java.lang.String s, NmeaReader.NMEAParserState ps) throws IllegalDataException
IllegalDataExceptionprivate static LatLon parseLatLon(java.lang.String ns, java.lang.String ew, java.lang.String dlat, java.lang.String dlon)
public GpxData getGpxData()
IGpxReadergetGpxData in interface IGpxReader