ist.palcom.services.location.palgpsparser
Class Parser

java.lang.Object
  extended by ist.palcom.services.location.palgpsparser.Parser

public class Parser
extends java.lang.Object

Parses and validate data sent by GPS receiver.


Constructor Summary
Parser()
           
 
Method Summary
static Record parseNMEA(java.lang.String s)
          Parses a string sent by GPS receiver.
static boolean validateChecksum(java.lang.String sentence)
          Returns true if checksum of NMEA sentence is valid All charachter xor'ed results in the trailing hex checksum The checksum calc starts after '$' and ends before '*'
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser()
Method Detail

parseNMEA

public static Record parseNMEA(java.lang.String s)
                        throws UnsupportedTypeException,
                               ParseException
Parses a string sent by GPS receiver.

Parameters:
s - String to be parsed
Returns:
Type of record
Throws:
UnsupportedTypeException - If type is not recognized
ParseException - If there was an error during parsing

validateChecksum

public static boolean validateChecksum(java.lang.String sentence)
Returns true if checksum of NMEA sentence is valid All charachter xor'ed results in the trailing hex checksum The checksum calc starts after '$' and ends before '*'

Parameters:
sentence - Sentence to be parsed
Returns:
Returns the boolean value whether the sentence is valid or not