LRAUV  revA
WaterDepthEnvelope.h
Go to the documentation of this file.
1 
12 #ifndef WATERDEPTHENVELOPE_H_
13 #define WATERDEPTHENVELOPE_H_
14 
15 #include "component/Behavior.h"
17 
19 
36 {
37 public:
38 
39  WaterDepthEnvelope( const Str& prefix, const Module* module );
40 
41  virtual ~WaterDepthEnvelope();
42 
44  void initialize( void );
45 
47  bool readParams( float &minWaterDepth, float& maxWaterDepth,
48  HorizontalControlIF::HorizontalMode& horizontalMode, float& speed,
49  float& latitude, float& longitude, float& seaFloorDepth );
50 
52  bool calcSatisfied( const float minWaterDepth, const float maxWaterDepth,
53  const float seaFloorDepth );
54 
56  void run();
57 
59  bool isSatisfied();
60 
62  bool runIfUnsatisfied();
63 
65  void uninitialize( void );
66 
68  const bool isFileOK();
69 
71 
73  static Behavior* CreateBehavior( const Str& prefix, const Module* module );
74 
76  void setFilePath( const char* path );
77 
78 protected:
79 
80  // Slate input setting variables
81 
84 
87 
90 
94 
98 
102 
105 
106  // Slate input measurements
107 
110 
113 
114  // Current sea floor depth at vehicle;
116 
117  // Current orientation of vehicle;
119 
120  // Slate output variables
121 
125 
129 
132 
133 private:
134  // Note that the copy constructor below is private and not given a body.
135  // Any attempt to call it will return a compiler error.
136  WaterDepthEnvelope( const WaterDepthEnvelope& old ); // disallow copy constructor
137 
138 };
139 
140 #endif /*WATERDEPTHENVELOPE_H_*/
bool calcSatisfied(const float minWaterDepth, const float maxWaterDepth, const float seaFloorDepth)
Perform the satisfied: return true if envelope "satisfied".
Definition: WaterDepthEnvelope.cpp:99
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: UniversalDataReader.h:26
DataWriter * headingCmdWriter_
Sets the heading for HeadingControl Default is zero.
Definition: WaterDepthEnvelope.h:128
UniversalDataReader * longitudeReader_
Current location (latitude [degrees north], longitude [degrees east])
Definition: WaterDepthEnvelope.h:112
void uninitialize(void)
Uninit function.
Definition: WaterDepthEnvelope.cpp:247
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: DataReader.h:30
UniversalDataReader * seaFloorDepthReader_
Definition: WaterDepthEnvelope.h:115
Behavior is the abstract base class for components that implement mission behaviors and commands...
Definition: Behavior.h:32
SettingReader * minWaterDepthSettingReader_
Desired minimum height above sea floor for the vehicle.
Definition: WaterDepthEnvelope.h:83
virtual ~WaterDepthEnvelope()
Definition: WaterDepthEnvelope.cpp:50
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
DataReader * longitudeCmdReader_
Current waypoint longitude going to HeadingControl.
Definition: WaterDepthEnvelope.h:97
HorizontalMode
Defines heading modes.
Definition: HorizontalControlIF.h:72
Contains the Behavior class definition.
Specifies the interface details for the HeadingControl component in the ControlModule.
void run()
Just do the run: ignore the results of the satisfied.
Definition: WaterDepthEnvelope.cpp:111
void initialize(void)
Initialize function.
Definition: WaterDepthEnvelope.cpp:54
Module is the abstract base class for a collection of Component objects that can be contained in a lo...
Definition: Module.h:45
Replacement for standard template class string.
Definition: Str.h:12
bool readParams(float &minWaterDepth, float &maxWaterDepth, HorizontalControlIF::HorizontalMode &horizontalMode, float &speed, float &latitude, float &longitude, float &seaFloorDepth)
Read in the parameters for satisfied or runIfUnsatisfied: return true if OK.
Definition: WaterDepthEnvelope.cpp:63
DataReader * headingCmdReader_
Current heading (radian) of the vehicle going to HeadingControl.
Definition: WaterDepthEnvelope.h:101
DataReader * latitudeCmdReader_
Current waypoint latitude going to HeadingControl.
Definition: WaterDepthEnvelope.h:93
bool runIfUnsatisfied()
Do the run, and return true if envelope "satisfied".
Definition: WaterDepthEnvelope.cpp:133
Contains the WaterDepthEnvelope Behavior/Command.
Definition: WaterDepthEnvelope.h:35
const bool isFileOK()
Indicates that the netcdf file is open and ok.
DataWriter * horizontalModeWriter_
Sets the depth mode for HeadingControl Default is HEADING.
Definition: WaterDepthEnvelope.h:124
Reads values from mission settings.
Definition: SettingReader.h:26
UniversalDataReader * orientationReader_
Definition: WaterDepthEnvelope.h:118
DataWriter * speedCmdWriter_
Sets the speed (in m/s) of the vehicle going to SpeedControl.
Definition: WaterDepthEnvelope.h:131
DataReader * horizontalModeReader_
Current heading mode going to HeadingControl.
Definition: WaterDepthEnvelope.h:89
static Behavior * CreateBehavior(const Str &prefix, const Module *module)
Returns the offshore bathymetry of a location.
Definition: WaterDepthEnvelope.cpp:255
SettingReader * maxWaterDepthSettingReader_
Desired maximum height above sea floor for the vehicle.
Definition: WaterDepthEnvelope.h:86
DataReader * speedCmdReader_
Current speed (in m/s) of the vehicle going to SpeedControl.
Definition: WaterDepthEnvelope.h:104
void setFilePath(const char *path)
For testing.
UniversalDataReader * latitudeReader_
Current location (latitude [degrees north], longitude [degrees east])
Definition: WaterDepthEnvelope.h:109
WaterDepthEnvelope(const Str &prefix, const Module *module)
Definition: WaterDepthEnvelope.cpp:20
bool isSatisfied()
Just do the satisfied: return true if envelope "satisfied".
Definition: WaterDepthEnvelope.cpp:117