es.uv.robotica.gvsig.mobile.gps
Class GPSFix

java.lang.Object
  extended byes.uv.robotica.gvsig.mobile.gps.GPSFix

public class GPSFix
extends java.lang.Object

Data structure containing all the relevant data of a GPS fix which can be obtained from a GPSDevice

Author:
juangui

Field Summary
static java.lang.String ALTITUDE
           
static java.lang.String DATETIME
           
static java.lang.String DEPTH
           
static java.lang.String FIX_DIMENSIONS
           
static int FIX_DIMENSIONS_2D
           
static int FIX_DIMENSIONS_3D
           
static int FIX_DIMENSIONS_INVALID
           
static java.lang.String FIX_QUALITY
           
static int FIX_QUALITY_DGPS
           
static int FIX_QUALITY_GPS
           
static int FIX_QUALITY_INVALID
           
static java.lang.String HDOP
           
static java.lang.String HEADING
           
static java.lang.String IDS_SATELLITES
           
static java.lang.String LATITUDE
           
static java.lang.String LOCATION
           
static java.lang.String LONGITUDE
           
static java.lang.String NUMBER_SATELLITES
           
static java.lang.String PDOP
           
static java.lang.String SATELLITE_INFO
           
static java.lang.String SPEED
           
static java.lang.String VDOP
           
 
Constructor Summary
GPSFix()
          Constructor
 
Method Summary
 double getAltitude()
           
 java.util.Date getDateTime()
           
 int getDay()
           
 double getDepth()
           
 int getDimensions()
           
 double getHDOP()
           
 double getHeading()
           
 int getHours()
           
 double getLatitude()
           
 double getLongitude()
           
 int getMinutes()
           
 int getMonth()
           
 int getNumberSatUsed()
           
 double getPDOP()
           
 int[] getPRNUsed()
           
 int getQuality()
           
 SatelliteInfo[] getSatelliteInfo()
           
 int getSeconds()
           
 double getSpeed()
           
 java.util.Date getTimestamp(java.lang.String key)
          Gets the timestamp for a particular GPS fix data field
 double getVDOP()
           
 int getYear()
           
 boolean isUpToDate(java.lang.String key)
          Compares data timestamp with the current GPS time
 void setAltitude(double value)
           
 void setDate(int y, int m, int d)
           
 void setDateTime(java.util.Date value)
           
 void setDepth(double value)
           
 void setDimensions(int value)
           
 void setHDOP(double value)
           
 void setHeading(double value)
           
 void setLatitude(double value)
           
 void setLongitude(double value)
           
 void setNumberSatUsed(int value)
           
 void setPDOP(double value)
           
 void setPRNUsed(int[] value)
           
 void setQuality(int value)
           
 void setSatelliteInfo(SatelliteInfo[] value)
           
 void setSpeed(double value)
           
 void setTime(int h, int m, int s)
           
 void setVDOP(double value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LATITUDE

public static final java.lang.String LATITUDE
See Also:
Constant Field Values

LONGITUDE

public static final java.lang.String LONGITUDE
See Also:
Constant Field Values

LOCATION

public static final java.lang.String LOCATION
See Also:
Constant Field Values

ALTITUDE

public static final java.lang.String ALTITUDE
See Also:
Constant Field Values

DEPTH

public static final java.lang.String DEPTH
See Also:
Constant Field Values

SPEED

public static final java.lang.String SPEED
See Also:
Constant Field Values

HEADING

public static final java.lang.String HEADING
See Also:
Constant Field Values

PDOP

public static final java.lang.String PDOP
See Also:
Constant Field Values

HDOP

public static final java.lang.String HDOP
See Also:
Constant Field Values

VDOP

public static final java.lang.String VDOP
See Also:
Constant Field Values

FIX_DIMENSIONS

public static final java.lang.String FIX_DIMENSIONS
See Also:
Constant Field Values

FIX_QUALITY

public static final java.lang.String FIX_QUALITY
See Also:
Constant Field Values

DATETIME

public static final java.lang.String DATETIME
See Also:
Constant Field Values

SATELLITE_INFO

public static final java.lang.String SATELLITE_INFO
See Also:
Constant Field Values

NUMBER_SATELLITES

public static final java.lang.String NUMBER_SATELLITES
See Also:
Constant Field Values

IDS_SATELLITES

public static final java.lang.String IDS_SATELLITES
See Also:
Constant Field Values

FIX_QUALITY_INVALID

public static final int FIX_QUALITY_INVALID
See Also:
Constant Field Values

FIX_QUALITY_GPS

public static final int FIX_QUALITY_GPS
See Also:
Constant Field Values

FIX_QUALITY_DGPS

public static final int FIX_QUALITY_DGPS
See Also:
Constant Field Values

FIX_DIMENSIONS_INVALID

public static final int FIX_DIMENSIONS_INVALID
See Also:
Constant Field Values

FIX_DIMENSIONS_2D

public static final int FIX_DIMENSIONS_2D
See Also:
Constant Field Values

FIX_DIMENSIONS_3D

public static final int FIX_DIMENSIONS_3D
See Also:
Constant Field Values
Constructor Detail

GPSFix

public GPSFix()
Constructor

Method Detail

getLatitude

public double getLatitude()

setLatitude

public void setLatitude(double value)

getLongitude

public double getLongitude()

setLongitude

public void setLongitude(double value)

getAltitude

public double getAltitude()

setAltitude

public void setAltitude(double value)

getSpeed

public double getSpeed()

setSpeed

public void setSpeed(double value)

getHeading

public double getHeading()

setHeading

public void setHeading(double value)

getPDOP

public double getPDOP()

setPDOP

public void setPDOP(double value)

getHDOP

public double getHDOP()

setHDOP

public void setHDOP(double value)

getVDOP

public double getVDOP()

setVDOP

public void setVDOP(double value)

getDimensions

public int getDimensions()

setDimensions

public void setDimensions(int value)

getQuality

public int getQuality()

setQuality

public void setQuality(int value)

getNumberSatUsed

public int getNumberSatUsed()

setNumberSatUsed

public void setNumberSatUsed(int value)

getPRNUsed

public int[] getPRNUsed()

setPRNUsed

public void setPRNUsed(int[] value)

getSatelliteInfo

public SatelliteInfo[] getSatelliteInfo()

setSatelliteInfo

public void setSatelliteInfo(SatelliteInfo[] value)

getDepth

public double getDepth()

setDepth

public void setDepth(double value)

getDateTime

public java.util.Date getDateTime()

getYear

public int getYear()

getMonth

public int getMonth()

getDay

public int getDay()

getHours

public int getHours()

getMinutes

public int getMinutes()

getSeconds

public int getSeconds()

setDateTime

public void setDateTime(java.util.Date value)

setDate

public void setDate(int y,
                    int m,
                    int d)
Parameters:
y -
m -
d -

setTime

public void setTime(int h,
                    int m,
                    int s)
Parameters:
h -
m -
s -

isUpToDate

public boolean isUpToDate(java.lang.String key)
Compares data timestamp with the current GPS time

Parameters:
key - key identifying the tipe of GPS fix data
Returns:
true if data timestamp is the same or more recent than GPS time

getTimestamp

public java.util.Date getTimestamp(java.lang.String key)
Gets the timestamp for a particular GPS fix data field

Parameters:
key - data field to return
Returns:
the timestamp