Package lejos.hardware.gps
Class GGASentence
- java.lang.Object
-
- lejos.hardware.gps.NMEASentence
-
- lejos.hardware.gps.GGASentence
-
public class GGASentence extends NMEASentence
This class has been designed to manage a GGA Sentence GGA - essential fix data which provide 3D location and accuracy data. $GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47 Where: GGA Global Positioning System Fix Data 123519 Fix taken at 12:35:19 UTC 4807.038,N Latitude 48 deg 07.038' N 01131.000,E Longitude 11 deg 31.000' E 1 Fix quality: 0 = invalid 1 = GPS fix (SPS) 2 = DGPS fix 3 = PPS fix 4 = Real Time Kinematic 5 = Float RTK 6 = estimated (dead reckoning) (2.3 feature) 7 = Manual input mode 8 = Simulation mode 08 Number of satellites being tracked 0.9 Horizontal dilution of position 545.4,M Altitude, Meters, above mean sea level 46.9,M Height of geoid (mean sea level) above WGS84 ellipsoid (empty field) time in seconds since last DGPS update (empty field) DGPS station ID number *47 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 GGASentence()
-
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.floatgetAltitude()Get AltitudeintgetFixQuality()Get GPS Quality DatafloatgetHDOP()Get Horizontal Dilution of Precision (HDOP)java.lang.StringgetHeader()Returns the NMEA header for this sentence.doublegetLatitude()Get LatitudechargetLatitudeDirection()Get Latitude DirectiondoublegetLongitude()Get LongitudechargetLongitudeDirection()Get Longitude DirectionintgetSatellitesTracked()Returns the number of satellites being tracked to determine the coordinates.intgetTime()Returns the last time stamp retrieved from a satellitevoidparse(java.lang.String sentence)Method used to parse a GGA Sentence-
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...)
-
getLatitude
public double getLatitude()
Get Latitude
-
getLatitudeDirection
public char getLatitudeDirection()
Get Latitude Direction- Returns:
- the latitude direction
-
getLongitude
public double getLongitude()
Get Longitude
-
getLongitudeDirection
public char getLongitudeDirection()
Get Longitude Direction- Returns:
- the longitude direction
-
getAltitude
public float getAltitude()
Get Altitude- Returns:
- the altitude
-
getTime
public int getTime()
Returns the last time stamp retrieved from a satellite- Returns:
- The time as a UTC integer. 123519 = 12:35:19 UTC
-
getSatellitesTracked
public int getSatellitesTracked()
Returns the number of satellites being tracked to determine the coordinates.- Returns:
- Number of satellites e.g. 8
-
getFixQuality
public int getFixQuality()
Get GPS Quality Data- Returns:
- the fix quality
-
getHDOP
public float getHDOP()
Get Horizontal Dilution of Precision (HDOP)- Returns:
- the hdop
-
parse
public void parse(java.lang.String sentence)
Method used to parse a GGA Sentence- Specified by:
parsein classNMEASentence
-
-