View Javadoc

1   package cz.cuni.amis.pogamut.usar2004.agent.module.sensor;
2   
3   import cz.cuni.amis.pogamut.usar2004.agent.module.datatypes.SensorType;
4   import javax.vecmath.Point4d;
5   
6   /**
7    * Sensor message representative for Tachometer sensor.
8    *
9    * @author vejmanm
10   */
11  public class SensorTachometer extends SuperSensor
12  {
13      //public static final String type="Tachometoer";
14      public static final SensorType type = SensorType.TACHOMETER;
15  
16      /**
17       * Ctor. Sensor type describes particular subject about which we want to
18       * know about. It is used to distinguish incoming message from the server.
19       */
20      public SensorTachometer()
21      {
22          super(type);
23      }
24  
25      /**
26       * Velocity of the robot measured by Tachometer. Not in the USARSim manual
27       * v3.1.3.
28       *
29       * @return Returns velocity from Tachometer.
30       */
31      public Point4d getVelocity()
32      {
33          return lastMessage.getVelocity();
34      }
35  
36      /**
37       * Position of the robot measured by Tachometer. Not in the USARSim manual
38       * v3.1.3.
39       *
40       * @return Returns position from Tachometer.
41       */
42      public Point4d getPosition()
43      {
44          //NOTE - really? tach has this property?
45          return lastMessage.getPosition();
46      }
47  }