public class GPSParser
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
debug
Flag to enable extra debugging stack traces for common cases that don't normally need stack traces.
|
| Constructor and Description |
|---|
GPSParser() |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
hasDigits(java.lang.String line,
int startPos) |
static java.lang.Object |
parseNMEA0183DataLine(java.lang.String line,
GpsFix fix,
SatelliteCatalog satCatalog,
java.lang.String source)
Parse an NMEA-0183 standard data sentence into GPS data structure values.
|
protected static java.lang.String[] |
split(java.lang.String line,
char separator)
This is a more optimized version of String.split() that doesn't require
compiling and evaluating regular expression patterns to do it, thereby
saving chunks of transient heap (and probably some CPU time as well).
|
public static boolean debug
public static java.lang.Object parseNMEA0183DataLine(java.lang.String line,
GpsFix fix,
SatelliteCatalog satCatalog,
java.lang.String source)
line - String line to parsefix - GpsFix data structure to populate, or null if a new one should be allocatedsatCatalog - SatelliteCatalog data structure to populate, or null if a new one should be allocatedsource - callsign of source (used only for error messages)protected static boolean hasDigits(java.lang.String line,
int startPos)
protected static java.lang.String[] split(java.lang.String line,
char separator)
line - the String to split at occurrences of the separatorseparator - the char delimiting substrings of the line