View Javadoc

1   package cz.cuni.amis.pogamut.usar2004.agent.module.state;
2   
3   import cz.cuni.amis.pogamut.usar2004.agent.module.datatypes.VehicleType;
4   
5   /**
6    * State message representative for Nautic vehicle.
7    * @author vejmanm
8    */
9   public class StateNautic extends SuperState
10  {
11      public static final VehicleType type = VehicleType.NAUTIC_VEHICLE;
12  
13      /**
14       * Ctor. State type describes particular subject about which we want to know
15       * about. It is used to distinguish incoming message from the server.
16       */
17      public StateNautic()
18      {
19          super(type);
20      }
21  
22      /**
23       * Note: parameter only available for robots of “NauticVehicle” type.
24       * Current rudder angle of the robot, in radians.
25       *
26       * @return Returns rudder angle.
27       */
28      public double getRudderAngle()
29      {
30          return lastMessage.getRudderAngle();
31      }
32  
33      /**
34       * Note: parameter only available for robots of “GroundVehicle” type.
35       * Current rear steer angle of the robot, in radians.
36       *
37       * @return Returns rear steer angle value.
38       */
39      public double getRudderSteer()
40      {
41          return lastMessage.getRearSteer();
42      }
43  }