lejos.addon.gps
Class NMEASentence
java.lang.Object
lejos.addon.gps.NMEASentence
- Direct Known Subclasses:
- GGASentence, GSASentence, GSVSentence, RMCSentence, VTGSentence
public abstract class NMEASentence
- extends Object
Class designed to manage all NMEA Sentence.
GGA and RMC Sentence needs to validate data.
This class has methods to validate receivedad data
- Author:
- Juan Antonio Brenha Moral, BB
Method Summary |
protected float |
degreesMinToDegrees(String DD_MM,
int CoordenateType)
Any GPS Receiver gives Lat/Lon data in the following way:
http://www.gpsinformation.org/dale/nmea.htm
http://www.teletype.com/pages/support/Documentation/RMC_log_info.htm
4807.038,N Latitude 48 deg 07.038' N
01131.000,E Longitude 11 deg 31.000' E
This data is necessary to convert to Decimal Degrees. |
abstract String |
getHeader()
Retrieve the header constant for this sentence. |
boolean |
isNumeric(String s)
|
protected abstract void |
parse(String sentence)
Abstract method to parse out all relevant data from the nmeaSentence. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LATITUDE
public static final int LATITUDE
- See Also:
- Constant Field Values
LONGITUDE
public static final int LONGITUDE
- See Also:
- Constant Field Values
NMEASentence
public NMEASentence()
getHeader
public abstract String getHeader()
- Retrieve the header constant for this sentence.
- Returns:
- The NMEA header string ($GPGGA, $GPVTG, etc...)
parse
protected abstract void parse(String sentence)
- Abstract method to parse out all relevant data from the nmeaSentence.
degreesMinToDegrees
protected float degreesMinToDegrees(String DD_MM,
int CoordenateType)
- Any GPS Receiver gives Lat/Lon data in the following way:
http://www.gpsinformation.org/dale/nmea.htm
http://www.teletype.com/pages/support/Documentation/RMC_log_info.htm
4807.038,N Latitude 48 deg 07.038' N
01131.000,E Longitude 11 deg 31.000' E
This data is necessary to convert to Decimal Degrees.
Latitude values has the range: -90 <-> 90
Longitude values has the range: -180 <-> 180
- Parameters:
DD_MM
- CoordenateType
-
- Returns:
isNumeric
public final boolean isNumeric(String s)