cz.cuni.amis.pogamut.usar2004.agent.module.sensor
Class SensorGPS

Package class diagram package SensorGPS
java.lang.Object
  extended by cz.cuni.amis.pogamut.usar2004.agent.module.sensor.SuperSensor
      extended by cz.cuni.amis.pogamut.usar2004.agent.module.sensor.SensorGPS

public class SensorGPS
extends SuperSensor

Author:
vejmanm

Field Summary
static SensorType type
           
 
Fields inherited from class cz.cuni.amis.pogamut.usar2004.agent.module.sensor.SuperSensor
lastMessage, sensorType
 
Constructor Summary
SensorGPS()
          Ctor.
 
Method Summary
 int getFix()
          â€?int’ indicates whether or not a position was acquired.
 Latitude getLatitude()
          â€?int’, ’double’, ’char’ provide the latitude degree, minute (as a decimal), and cardinal description (i.e.
 Longitude getLongitude()
          â€?int’, ’float’, ’char’ provide the longitude degree, minute (as a decimal), and cardinal description (i.e.
 int getSatellites()
          â€?int’ gives the number of satellites tracked by the GPS sensor.
 
Methods inherited from class cz.cuni.amis.pogamut.usar2004.agent.module.sensor.SuperSensor
getName, getSensorType, getTime, getType, isReady, updateMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public static final SensorType type
Constructor Detail

SensorGPS

public SensorGPS()
Ctor. Sensor type describes particular subject about which we want to know about. It is used to distinguish incoming message from the server.

Method Detail

getLatitude

public Latitude getLatitude()
�int’, ’double’, ’char’ provide the latitude degree, minute (as a decimal), and cardinal description (i.e. �N’ or �S’), respectively. There are only two possible values for the �char’ parameter: �N’ for North and �S’ for South.

Returns:
Returns Latitude value of the sensor.

getLongitude

public Longitude getLongitude()
�int’, ’float’, ’char’ provide the longitude degree, minute (as a decimal), and cardinal description (i.e. �E’ or �W’), respectively. There are only two possible values for the �char’ parameter: �E’ for East and �W’ for West.

Returns:
Returns Longitude value of the sensor.

getFix

public int getFix()
�int’ indicates whether or not a position was acquired. The fix is the same as the GGA format. Namely, a value of 0 means that the GPS sensor failed to acquire a position and a value of 1 means that a position was acquired.

Returns:
Returns 0 - failed to acquire a position or 1 - success.

getSatellites

public int getSatellites()
�int’ gives the number of satellites tracked by the GPS sensor. This number is an inexplicit source of accuracy. The more satellites are tracked, the higher the position accuracy.

Returns:
Returns number of active GPS satellite connections.


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.