Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ka2ddo.gps
Class GpsFix

    java.lang.Object
      org.ka2ddo.gps.GpsFix

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

    public class GpsFix

extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

This class is a data structure containing one GPS location fix. Position, velocity, quality, and time of fix are all reported.

See Also:
  Serialized Form

Field Summary
`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 Summary
`GpsFix()`

Method Summary
`void` | `copyInto(GpsFix dest)` Overwrite another GpsFix object with this GpsFix's values.
`GpsFix` | `dup()` Make a deep copy of this GpsFix object.
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NMI_SMI

    public static final float NMI_SMI

  Constant for converting nautical miles to statute miles.

  See Also:
    Constant Field Values

### NMI_KM

    public static final float NMI_KM

  Constant for converting nautical miles to kilometers.

  See Also:
    Constant Field Values

### timestamp

    public long timestamp

  Timestamp of last GPS sentence in Java milliseconds since 1 Jan 1970 UTC.

### latitude

    public double latitude

  GPS latitude in degrees North.

### longitude

    public double longitude

  GPS longitude in degrees East.

### quality

    public GpsFixQuality quality

  Quality of the last GPS fix.

### numSatellites

    public int numSatellites

  Number of satellites used for the last fix, or -1 for unknown.

### hdop

    public float hdop

  Horizontal dilution of precision value.

### amslM

    public float amslM

  GPS altitude in meters above mean sea level (WGS84 model).

### secSinceLastDGps

    public float secSinceLastDGps

  Seconds since the last differential GPS correction data was received, or -1 if unknown.

### dgpsStationId

    public int dgpsStationId

  The ID number of the differential GPS surface station that transmitted the last-received correction data.

### speed

    public float speed

  Speed of motion in knots (nautical miles per hour), or -1 if unknown.

### bearing

    public float bearing

  Bearing of travel, in degrees relative to True North.

### localToGpsClockDiff

    public long localToGpsClockDiff

  Error in milliseconds between computer system clock and GPS time.

### source

    public java.lang.String 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_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).

  See Also:
    Constant Field Values

### SENTENCETYPE_GLL

    public static final short SENTENCETYPE_GLL

  A $GPGLL sentence provided the position.

  See Also:
    Constant Field Values

### SENTENCETYPE_GGA

    public static final short SENTENCETYPE_GGA

  A $GPGGA sentence provided the position.

  See Also:
    Constant Field Values

### SENTENCETYPE_RMC

    public static final short SENTENCETYPE_RMC

  A $GPRMC sentence provided the position.

  See Also:
    Constant Field Values

### lastPositionSentenceType

    public short lastPositionSentenceType

  Indicate the type of GPS sentence that provided the position and course information.

  See Also:
    `SENTENCETYPE_GGA`, `SENTENCETYPE_GLL`, `SENTENCETYPE_RMC`, `SENTENCETYPE_UNKNOWN`

Constructor Detail

### GpsFix

    public GpsFix()

Method Detail

### toString

    public java.lang.String toString()

  Returns a string representation of the object.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string representation of the object.

### dup

    public GpsFix dup()

  Make a deep copy of this GpsFix object.

  Returns:
    copy of this object
  See Also:
    `Cloneable`

### copyInto

    public void copyInto(GpsFix dest)

  Overwrite another GpsFix object with this GpsFix's values.

  Parameters:
    `dest` - GpsFix to copy the values into

### sameValue

    public boolean sameValue(GpsFix other)

  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)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD