LRAUV  revA
OffshoreEnvelope.h
Go to the documentation of this file.
1 
12 #ifndef OFFSHOREENVELOPE_H_
13 #define OFFSHOREENVELOPE_H_
14 
15 #include "component/Behavior.h"
17 
19 
35 class OffshoreEnvelope : public Behavior
36 {
37 public:
38 
39  OffshoreEnvelope( const Str& prefix, const Module* module );
40 
41  virtual ~OffshoreEnvelope();
42 
44  void initialize( void );
45 
47  bool readParams( float &minOffshore, float& maxOffshore,
48  HorizontalControlIF::HorizontalMode& horizontalMode, float& speed,
49  float& latitude, float& longitude, float& offshoreDistance );
50 
52  bool calcSatisfied( const float minOffshore, const float maxOffshore,
53  const float offshoreDistance );
54 
56  void run();
57 
59  bool isSatisfied();
60 
62  bool runIfUnsatisfied();
63 
65  void uninitialize( void );
66 
68  static Behavior* CreateBehavior( const Str& prefix, const Module* module );
69 
70 protected:
71 
73 
74  // Slate input setting variables
75 
78 
81 
84 
88 
92 
96 
100 
103 
104  // Slate input measurements
105 
108 
111 
112  // Current distance from shore of vehicle;
114 
115  // Current orientation of vehicle;
117 
118  // Slate output variables
119 
123 
127 
130 
131 private:
132  // Note that the copy constructor below is private and not given a body.
133  // Any attempt to call it will return a compiler error.
134  OffshoreEnvelope( const OffshoreEnvelope& old ); // disallow copy constructor
135 
136 };
137 
138 #endif /*OFFSHOREENVELOPE_H_*/
SettingReader * minOffshoreSettingReader_
Desired minimum height above sea floor for the vehicle.
Definition: OffshoreEnvelope.h:77
UniversalDataReader * latitudeReader_
Current location (latitude [degrees north], longitude [degrees east])
Definition: OffshoreEnvelope.h:107
DataReader * latitudeCmdReader_
Current waypoint latitude going to HeadingControl.
Definition: OffshoreEnvelope.h:87
DataReader * bearingCmdReader_
Current bearing (radian) of the vehicle going to HeadingControl.
Definition: OffshoreEnvelope.h:95
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: UniversalDataReader.h:26
bool calcSatisfied(const float minOffshore, const float maxOffshore, const float offshoreDistance)
Perform the satisfied: return true if envelope "satisfied".
Definition: OffshoreEnvelope.cpp:100
UniversalDataReader * offshoreDistanceReader_
Definition: OffshoreEnvelope.h:113
void initialize(void)
Initialize function.
Definition: OffshoreEnvelope.cpp:56
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: DataReader.h:30
SettingReader * maxOffshoreSettingReader_
Desired maximum height above sea floor for the vehicle.
Definition: OffshoreEnvelope.h:80
DataReader * longitudeCmdReader_
Current waypoint longitude going to HeadingControl.
Definition: OffshoreEnvelope.h:91
DataWriter * headingCmdWriter_
Sets the heading for HeadingControl Default is zero.
Definition: OffshoreEnvelope.h:126
UniversalDataReader * orientationReader_
Definition: OffshoreEnvelope.h:116
Behavior is the abstract base class for components that implement mission behaviors and commands...
Definition: Behavior.h:32
void run()
Just do the run: ignore the results of the satisfied.
Definition: OffshoreEnvelope.cpp:112
DataWriter * horizontalModeWriter_
Sets the depth mode for HeadingControl Default is HEADING.
Definition: OffshoreEnvelope.h:122
Timestamp lastTimeInEnvelope_
Definition: OffshoreEnvelope.h:72
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
bool isSatisfied()
Just do the satisfied: return true if envelope "satisfied".
Definition: OffshoreEnvelope.cpp:118
bool readParams(float &minOffshore, float &maxOffshore, HorizontalControlIF::HorizontalMode &horizontalMode, float &speed, float &latitude, float &longitude, float &offshoreDistance)
Read in the parameters for satisfied or runIfUnsatisfied: return true if OK.
Definition: OffshoreEnvelope.cpp:65
HorizontalMode
Defines heading modes.
Definition: HorizontalControlIF.h:72
Contains the Behavior class definition.
Specifies the interface details for the HeadingControl component in the ControlModule.
DataReader * headingCmdReader_
Current heading (radian) of the vehicle going to HeadingControl.
Definition: OffshoreEnvelope.h:99
Module is the abstract base class for a collection of Component objects that can be contained in a lo...
Definition: Module.h:45
static Behavior * CreateBehavior(const Str &prefix, const Module *module)
Mission Component factory interface.
Definition: OffshoreEnvelope.cpp:259
Replacement for standard template class string.
Definition: Str.h:12
DataWriter * speedCmdWriter_
Sets the speed (in m/s) of the vehicle going to SpeedControl.
Definition: OffshoreEnvelope.h:129
DataReader * speedCmdReader_
Current speed (in m/s) of the vehicle going to SpeedControl.
Definition: OffshoreEnvelope.h:102
DataReader * horizontalModeReader_
Current heading mode going to HeadingControl.
Definition: OffshoreEnvelope.h:83
OffshoreEnvelope(const Str &prefix, const Module *module)
Definition: OffshoreEnvelope.cpp:20
Reads values from mission settings.
Definition: SettingReader.h:26
Contains the OffshoreEnvelope Behavior/Command.
Definition: OffshoreEnvelope.h:35
virtual ~OffshoreEnvelope()
Definition: OffshoreEnvelope.cpp:52
UniversalDataReader * longitudeReader_
Current location (latitude [degrees north], longitude [degrees east])
Definition: OffshoreEnvelope.h:110
Represents absolute times.
Definition: Timestamp.h:31
bool runIfUnsatisfied()
Do the run, and return true if envelope "satisfied".
Definition: OffshoreEnvelope.cpp:136
void uninitialize(void)
Uninit function.
Definition: OffshoreEnvelope.cpp:251