LRAUV  revA
KeepStation.h
Go to the documentation of this file.
1 
12 #ifndef KEEPSTATION_H_
13 #define KEEPSTATION_H_
14 
15 #include "component/Behavior.h"
16 #include "data/Location.h"
17 
19 
35 class KeepStation : public Behavior
36 {
37 public:
38 
39  KeepStation( const Str& prefix, const Module* module );
40 
41  virtual ~KeepStation();
42 
44  void readSettings( void );
45 
47  void initialize( void );
48 
50  void run();
51 
53  bool isSatisfied();
54 
56  bool runIfUnsatisfied();
57 
59  void uninitialize( void );
60 
62  static Behavior* CreateBehavior( const Str& prefix, const Module* module );
63 
64 protected:
65 
66  // "Most Recent" variables
67  double latitude_;
68  double longitude_;
69 
70  // Slate input setting variables
71 
74 
77 
81 
84 
85 
88 
89  // Sets the heading mode for HeadingControl
91 
92  // Sets the bearing cmd for HeadingControl
94 
97 
100 
104 
107 
108  typedef enum
109  {
111  REST = 1,
113  } KeepStationMode;
114 
117 
120 
123 
128 
133 
136 
139 
143 
146 
147 private:
148  // Note that the copy constructor below is private and not given a body.
149  // Any attempt to call it will return a compiler error.
150  KeepStation( const KeepStation& old ); // disallow copy constructor
151 
152 };
153 
154 #endif /* KEEPSTATION_H_ */
double longitude_
Definition: KeepStation.h:68
void uninitialize(void)
Uninit function.
Definition: KeepStation.cpp:293
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: UniversalDataReader.h:26
double targetLatitude_
The desired latitude the behavior will try to acquire next if mode is GOTO_INITIAL_WAYPOINT or GOTO_N...
Definition: KeepStation.h:127
double targetLongitude_
The desired longitude the behavior will try to acquire next if mode is GOTO_INITIAL_WAYPOINT or GOTO_...
Definition: KeepStation.h:132
float speedSetting_
Desired speed to get on station.
Definition: KeepStation.h:106
Definition: KeepStation.h:112
bool initialized_
Have we learned all our initial settings?
Definition: KeepStation.h:135
Behavior is the abstract base class for components that implement mission behaviors and commands...
Definition: Behavior.h:32
virtual ~KeepStation()
Definition: KeepStation.cpp:68
bool startOverLine_
Is our starting point latitude > than the latitude of the starting longitude on the crossing line...
Definition: KeepStation.h:142
void initialize(void)
Initialize function.
Definition: KeepStation.cpp:104
DataWriter * horizontalModeWriter_
Definition: KeepStation.h:90
bool isSatisfied()
return true if vehicle within radius of waypoint
Definition: KeepStation.cpp:223
float perpendicularSlope_
Slope for crossing line (thru wapoint)
Definition: KeepStation.h:138
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
KeepStation(const Str &prefix, const Module *module)
Definition: KeepStation.cpp:33
Definition: KeepStation.h:111
Contains the Behavior class definition.
double latitudeSetting_
Desired latitude of the behavior's stationing point.
Definition: KeepStation.h:96
KeepStationMode mode_
The current mode the behavior is in.
Definition: KeepStation.h:116
bool runIfUnsatisfied()
Do the run, and return true if envelope "satisfied".
Definition: KeepStation.cpp:285
Module is the abstract base class for a collection of Component objects that can be contained in a lo...
Definition: Module.h:45
float startLongitude_
Longitude at the time of initialization.
Definition: KeepStation.h:122
UniversalDataReader * longitudeReader_
Definition: KeepStation.h:145
SettingReader * longitudeSettingReader_
Desired longitude the vehicle should stay stationed at.
Definition: KeepStation.h:76
Replacement for standard template class string.
Definition: Str.h:12
void run()
Just do the run: ignore the results of the satisfied.
Definition: KeepStation.cpp:132
float radiusSetting_
Desired radius around the latitude, longitude that the behavior should will try to remain stationed a...
Definition: KeepStation.h:103
KeepStationMode
Definition: KeepStation.h:108
SettingReader * speedSettingReader_
Desired speed to get on station.
Definition: KeepStation.h:83
SettingReader * radiusSettingReader_
Desired radius around the latitude, longitude that the vehicle should stay stationed at...
Definition: KeepStation.h:80
DataWriter * headingCmdWriter_
Definition: KeepStation.h:93
Reads values from mission settings.
Definition: SettingReader.h:26
double longitudeSetting_
Desired longitude of the behavior's stationing point.
Definition: KeepStation.h:99
void readSettings(void)
Read behavior settings.
Definition: KeepStation.cpp:72
float startLatitude_
Latitude at the time of initialization.
Definition: KeepStation.h:119
double latitude_
Definition: KeepStation.h:67
static Behavior * CreateBehavior(const Str &prefix, const Module *module)
Mission Component factory interface.
Definition: KeepStation.cpp:301
SettingReader * latitudeSettingReader_
Desired latitude of the vehicle should be stationed at.
Definition: KeepStation.h:73
Contains the Location class definition.
DataWriter * speedCmdWriter_
Dynamic Control Speed Mode setting.
Definition: KeepStation.h:87
UniversalDataReader * latitudeReader_
Definition: KeepStation.h:144
Contains the DepthEnvelope Behavior/Command If the vehicle's depth is within the specified max/min en...
Definition: KeepStation.h:35
Definition: KeepStation.h:110