Package lejos.hardware.gps
Class NMEASentence
- java.lang.Object
-
- lejos.hardware.gps.NMEASentence
-
- Direct Known Subclasses:
GGASentence,GSASentence,GSVSentence,RMCSentence,VTGSentence
public abstract class NMEASentence extends java.lang.ObjectClass 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
-
-
Constructor Summary
Constructors Constructor Description NMEASentence()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected floatdegreesMinToDegrees(java.lang.String DD_MM, int CoordinateType)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 java.lang.StringgetHeader()Retrieve the header constant for this sentence.booleanisNumeric(java.lang.String s)protected abstract voidparse(java.lang.String sentence)Abstract method to parse out all relevant data from the nmeaSentence.
-
-
-
Field Detail
-
LATITUDE
public static final int LATITUDE
- See Also:
- Constant Field Values
-
LONGITUDE
public static final int LONGITUDE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHeader
public abstract java.lang.String getHeader()
Retrieve the header constant for this sentence.- Returns:
- The NMEA header string ($GPGGA, $GPVTG, etc...)
-
parse
protected abstract void parse(java.lang.String sentence)
Abstract method to parse out all relevant data from the nmeaSentence.
-
degreesMinToDegrees
protected float degreesMinToDegrees(java.lang.String DD_MM, int CoordinateType)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-CoordinateType-- Returns:
- the degrees
-
isNumeric
public final boolean isNumeric(java.lang.String s)
-
-