javaclient
Class GPSInterface

java.lang.Object
  extended by javaclient.PlayerDevice
      extended by javaclient.GPSInterface

public class GPSInterface
extends PlayerDevice

The gps interface provides access to an absolute position system, such as GPS. This interface accepts no commands.

Version:
Author:
Maxim A. Batalin & Radu Bogdan Rusu

Field Summary
 
Fields inherited from class javaclient.PlayerDevice
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec
 
Constructor Summary
GPSInterface(PlayerClient pc, short indexOfDevice)
          Constructor for GPSInterface.
 
Method Summary
 int getAltitude()
          Get the altitude, in millimeters.
 int getErrHorz()
          Get the horizontal error in mm.
 int getErrVert()
          Get the vertical error in mm.
 short getHDop()
          Get the horizontal dilution of position (HDOP), times 10.
 int getLatitude()
          Get the latitude in degrees / 1e7.
 int getLongitude()
          Get the longitude in degrees / 1e7.
 byte getNumSats()
          Get the number of satellites in view.
 byte getQuality()
          Get the quality of fix.
 int getTimeSec()
          Get the GPS (UTC) time in seconds since the epoch.
 int getTimeuSec()
          Get the GPS (UTC) time in microseconds since the epoch.
 int getUtmE()
          Get the UTM WGS84 coordinates, easting in cm.
 int getUtmN()
          Get the UTM WGS84 coordinates, northing in cm.
 short getVDop()
          Get the vertical dilution of position (VDOP), times 10.
 void readData()
          Read the current global position and heading information.
 
Methods inherited from class javaclient.PlayerDevice
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, handleResponse, readHeader, sendHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPSInterface

public GPSInterface(PlayerClient pc,
                    short indexOfDevice)
Constructor for GPSInterface.

Parameters:
pc - a reference to the PlayerClient object
indexOfDevice - the index of the device
Method Detail

readData

public void readData()
Read the current global position and heading information.

Overrides:
readData in class PlayerDevice

getTimeSec

public int getTimeSec()
Get the GPS (UTC) time in seconds since the epoch.

Returns:
the GPS (UTC) time in seconds since the epoch as an integer

getTimeuSec

public int getTimeuSec()
Get the GPS (UTC) time in microseconds since the epoch.

Returns:
the GPS (UTC) time in microseconds since the epoch as an integer

getLatitude

public int getLatitude()
Get the latitude in degrees / 1e7.

Returns:
the latitude in degrees / 1e7 as an integer

getLongitude

public int getLongitude()
Get the longitude in degrees / 1e7.

Returns:
the longitude in degrees / 1e7 as an integer

getAltitude

public int getAltitude()
Get the altitude, in millimeters.

Returns:
the altitude, in millimeters as an integer

getUtmE

public int getUtmE()
Get the UTM WGS84 coordinates, easting in cm.

Returns:
the UTM WGS84 coordinates, easting in cm as an integer.

getUtmN

public int getUtmN()
Get the UTM WGS84 coordinates, northing in cm.

Returns:
the UTM WGS84 coordinates, northing in cm as an integer.

getQuality

public byte getQuality()
Get the quality of fix.

Returns:
0 = invalid, 1 = GPS fix, 2 = DGPS fix

getNumSats

public byte getNumSats()
Get the number of satellites in view.

Returns:
the number of satellites in view as a byte.

getHDop

public short getHDop()
Get the horizontal dilution of position (HDOP), times 10.

Returns:
the horizontal dilution of position (HDOP), times 10 as a short

getVDop

public short getVDop()
Get the vertical dilution of position (VDOP), times 10.

Returns:
the vertical dilution of position (VDOP), times 10 as a short

getErrHorz

public int getErrHorz()
Get the horizontal error in mm.

Returns:
the horizontal error in mm as an integer

getErrVert

public int getErrVert()
Get the vertical error in mm.

Returns:
the vertical error in mm as an integer