public class GpsFix extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, PositionSrc
Modifier and Type | Field and Description |
---|---|
float |
amslM
GPS altitude in meters above mean sea level (WGS84 model).
|
float |
bearing
Bearing of travel, in degrees relative to True North.
|
int |
dgpsStationId
The ID number of the differential GPS surface station that transmitted the last-received correction data.
|
float |
hdop
Horizontal dilution of precision value.
|
short |
lastPositionSentenceType
Indicate the type of GPS sentence that provided the position and course information.
|
double |
latitude
GPS latitude in degrees North.
|
long |
localToGpsClockDiff
Error in milliseconds between computer system clock and GPS time.
|
double |
longitude
GPS longitude in degrees East.
|
static float |
NMI_KM
Constant for converting nautical miles to kilometers.
|
static float |
NMI_SMI
Constant for converting nautical miles to statute miles.
|
int |
numSatellites
Number of satellites used for the last fix, or -1 for unknown.
|
GpsFixQuality |
quality
Quality of the last GPS fix.
|
float |
secSinceLastDGps
Seconds since the last differential GPS correction data was received, or -1 if unknown.
|
static short |
SENTENCETYPE_GGA
A $GPGGA sentence provided the position.
|
static short |
SENTENCETYPE_GLL
A $GPGLL sentence provided the position.
|
static short |
SENTENCETYPE_RMC
A $GPRMC sentence provided the position.
|
static short |
SENTENCETYPE_UNKNOWN
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).
|
java.lang.String |
source
The name of the remote GPS providing this fix (null if for the station's own local GPS).
|
float |
speed
Speed of motion in knots (nautical miles per hour), or -1 if unknown.
|
long |
timestamp
Timestamp of last GPS sentence in Java milliseconds since 1 Jan 1970 UTC.
|
Constructor and Description |
---|
GpsFix() |
Modifier and Type | Method and Description |
---|---|
void |
copyInto(GpsFix dest)
Overwrite another GpsFix object with this GpsFix's values.
|
GpsFix |
dup()
Make a deep copy of this GpsFix object.
|
double |
getHorizontalAccuracy()
Return the position's horizontal accuracy.
|
float |
getPositionAltitude()
Return the position's altitude.
|
double |
getPositionLatitude()
Return the position's latitude.
|
double |
getPositionLongitude()
Return the position's longitude.
|
long |
getPositionTime()
Return when this position was determined.
|
boolean |
sameValue(GpsFix other)
Test if this GpsFix is close enough to another fix to be considered the same position.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
public static final float NMI_SMI
public static final float NMI_KM
public long timestamp
public double latitude
public double longitude
public GpsFixQuality quality
public int numSatellites
public float hdop
public float amslM
public float secSinceLastDGps
public int dgpsStationId
public float speed
public float bearing
public long localToGpsClockDiff
public java.lang.String source
public static final short SENTENCETYPE_UNKNOWN
public static final short SENTENCETYPE_GLL
public static final short SENTENCETYPE_GGA
public static final short SENTENCETYPE_RMC
public short lastPositionSentenceType
public java.lang.String toString()
toString
in class java.lang.Object
public GpsFix dup()
Cloneable
public void copyInto(GpsFix dest)
dest
- GpsFix to copy the values intopublic boolean sameValue(GpsFix other)
other
- another GpsFix object to comparepublic double getPositionLatitude()
getPositionLatitude
in interface PositionSrc
public double getPositionLongitude()
getPositionLongitude
in interface PositionSrc
public float getPositionAltitude()
getPositionAltitude
in interface PositionSrc
public double getHorizontalAccuracy()
getHorizontalAccuracy
in interface PositionSrc
public long getPositionTime()
getPositionTime
in interface PositionSrc