Package lejos.hardware.gps
Class RMCSentence
- java.lang.Object
-
- lejos.hardware.gps.NMEASentence
-
- lejos.hardware.gps.RMCSentence
-
public class RMCSentence extends NMEASentence
RMC is a Class designed to manage RMC Sentences from a NMEA GPS Receiver RMC - NMEA has its own version of essential gps pvt (position, velocity, time) data. It is called RMC, The Recommended Minimum, which will look similar to: $GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A Where: RMC Recommended Minimum sentence C 123519 Fix taken at 12:35:19 UTC A Status A=active or V=Void. 4807.038,N Latitude 48 deg 07.038' N 01131.000,E Longitude 11 deg 31.000' E 022.4 Speed over the ground in knots 084.4 Track angle in degrees True 230394 Date - 23rd of March 1994 003.1,W Magnetic Variation *6A The checksum data, always begins with *- Author:
- Juan Antonio Brenha Moral Added changes by Alan M Gilkes - Nov 12th 2014 - Lawrie Griffiths
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringHEADER-
Fields inherited from class lejos.hardware.gps.NMEASentence
LATITUDE, LONGITUDE
-
-
Constructor Summary
Constructors Constructor Description RMCSentence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected doubledegreesMinToDegreesDbl(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.floatgetCompassDegrees()Return compass value from GPSintgetDate()Get date in integer formatjava.lang.StringgetHeader()Returns the NMEA header for this sentence.doublegetLatitude()Get LatitudedoublegetLongitude()Get LongitudefloatgetSpeed()Get Speed in Kilometersjava.lang.StringgetStatus()intgetTime()Get time in integer formatvoidparse(java.lang.String sentence)Parse a RMC Sentence $GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62-
Methods inherited from class lejos.hardware.gps.NMEASentence
degreesMinToDegrees, isNumeric
-
-
-
-
Field Detail
-
HEADER
public static final java.lang.String HEADER
- See Also:
- Constant Field Values
-
-
Method Detail
-
degreesMinToDegreesDbl
protected double degreesMinToDegreesDbl(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
-
getHeader
public java.lang.String getHeader()
Returns the NMEA header for this sentence.- Specified by:
getHeaderin classNMEASentence- Returns:
- The NMEA header string ($GPGGA, $GPVTG, etc...)
-
getStatus
public java.lang.String getStatus()
-
getLatitude
public double getLatitude()
Get Latitude
-
getLongitude
public double getLongitude()
Get Longitude- Returns:
- the longitude
-
getSpeed
public float getSpeed()
Get Speed in Kilometers- Returns:
- the speed
-
getTime
public int getTime()
Get time in integer format- Returns:
- the time
-
getDate
public int getDate()
Get date in integer format- Returns:
- the date
-
getCompassDegrees
public float getCompassDegrees()
Return compass value from GPS- Returns:
- the compass heading
-
parse
public void parse(java.lang.String sentence)
Parse a RMC Sentence $GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62- Specified by:
parsein classNMEASentence
-
-