Package org.ka2ddo.gps
Class GpsFix
java.lang.Object
org.ka2ddo.gps.GpsFix
- All Implemented Interfaces:
Serializable
,Cloneable
This class is a data structure containing one GPS location fix. Position, velocity,
quality, and time of fix are all reported.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionfloat
GPS altitude in meters above mean sea level (WGS84 model).float
Bearing of travel, in degrees relative to True North.int
The ID number of the differential GPS surface station that transmitted the last-received correction data.float
Horizontal dilution of precision value.short
Indicate the type of GPS sentence that provided the position and course information.double
GPS latitude in degrees North.long
Error in milliseconds between computer system clock and GPS time.double
GPS longitude in degrees East.static final float
Constant for converting nautical miles to kilometers.static final float
Constant for converting nautical miles to statute miles.int
Number of satellites used for the last fix, or -1 for unknown.Quality of the last GPS fix.float
Seconds since the last differential GPS correction data was received, or -1 if unknown.static final short
A $GPGGA sentence provided the position.static final short
A $GPGLL sentence provided the position.static final short
A $GPRMC sentence provided the position.static final short
We don't know what kind of sentence provided the position information (or it's something not included in the compressed position definition in the APRS protocol specification).The name of the remote GPS providing this fix (null if for the station's own local GPS).float
Speed of motion in knots (nautical miles per hour), or -1 if unknown.long
Timestamp of last GPS sentence in Java milliseconds since 1 Jan 1970 UTC. -
Constructor Summary
-
Method Summary
-
Field Details
-
NMI_SMI
public static final float NMI_SMIConstant for converting nautical miles to statute miles.- See Also:
-
NMI_KM
public static final float NMI_KMConstant for converting nautical miles to kilometers.- See Also:
-
timestamp
public long timestampTimestamp of last GPS sentence in Java milliseconds since 1 Jan 1970 UTC. -
latitude
public double latitudeGPS latitude in degrees North. -
longitude
public double longitudeGPS longitude in degrees East. -
quality
Quality of the last GPS fix. -
numSatellites
public int numSatellitesNumber of satellites used for the last fix, or -1 for unknown. -
hdop
public float hdopHorizontal dilution of precision value. -
amslM
public float amslMGPS altitude in meters above mean sea level (WGS84 model). -
secSinceLastDGps
public float secSinceLastDGpsSeconds since the last differential GPS correction data was received, or -1 if unknown. -
dgpsStationId
public int dgpsStationIdThe ID number of the differential GPS surface station that transmitted the last-received correction data. -
speed
public float speedSpeed of motion in knots (nautical miles per hour), or -1 if unknown. -
bearing
public float bearingBearing of travel, in degrees relative to True North. -
localToGpsClockDiff
public long localToGpsClockDiffError in milliseconds between computer system clock and GPS time. -
source
The name of the remote GPS providing this fix (null if for the station's own local GPS). -
SENTENCETYPE_UNKNOWN
public static final short SENTENCETYPE_UNKNOWNWe don't know what kind of sentence provided the position information (or it's something not included in the compressed position definition in the APRS protocol specification).- See Also:
-
SENTENCETYPE_GLL
public static final short SENTENCETYPE_GLLA $GPGLL sentence provided the position.- See Also:
-
SENTENCETYPE_GGA
public static final short SENTENCETYPE_GGAA $GPGGA sentence provided the position.- See Also:
-
SENTENCETYPE_RMC
public static final short SENTENCETYPE_RMCA $GPRMC sentence provided the position.- See Also:
-
lastPositionSentenceType
public short lastPositionSentenceTypeIndicate the type of GPS sentence that provided the position and course information.
-
-
Constructor Details
-
GpsFix
public GpsFix()
-
-
Method Details
-
toString
Returns a string representation of the object. -
dup
Make a deep copy of this GpsFix object.- Returns:
- copy of this object
- See Also:
-
copyInto
Overwrite another GpsFix object with this GpsFix's values.- Parameters:
dest
- GpsFix to copy the values into
-
sameValue
Test if this GpsFix is close enough to another fix to be considered the same position.- Parameters:
other
- another GpsFix object to compare- Returns:
- boolean true if close enough (.0002 degrees of latitude and longitude, 0.1 knots of speed, and 1 degree of bearing)
-