no.ubicollab.osgi
Class Parser

java.lang.Object
  extended by no.ubicollab.osgi.Parser

public class Parser
extends java.lang.Object

Parser for the $(GP)RMC command of the NMEA-0183 GPS standard. See http://vancouver-webpages.com/peter/nmeafaq.txt for details

Author:
Andreas Brustad

Field Summary
static java.lang.String WARNING
           
 
Constructor Summary
Parser()
           
 
Method Summary
static LocationData parse(java.lang.String string)
          Parses the $GPRMC command and returns the positiondata as a LocationData object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WARNING

public static final java.lang.String WARNING
See Also:
Constant Field Values
Constructor Detail

Parser

public Parser()
Method Detail

parse

public static LocationData parse(java.lang.String string)
Parses the $GPRMC command and returns the positiondata as a LocationData object. As the GPRMC command does not contain altitude, this is set to "0".

Parameters:
string - The $GPRMC string to parse.
Returns:
a LocationData object with the position, or null if parsing failed or the GPS reported that the data was inaccurate (Warning field set to Parser.WARNING).
See Also:
LocationData