LRAUV  revA
Circle.h
Go to the documentation of this file.
1 
12 #ifndef CIRCLE_H_
13 #define CIRCLE_H_
14 
15 #include "component/Behavior.h"
16 #include "data/Location.h"
17 
19 
29 class Circle : public Behavior
30 {
31 public:
32 
33  Circle( const Str& prefix, const Module* module );
34 
35  virtual ~Circle();
36 
38  void initialize( void );
39 
42  bool isSatisfied();
43 
45  bool runIfUnsatisfied();
46 
48  void run();
49 
51  void uninitialize( void );
52 
54  static Behavior* CreateBehavior( const Str& prefix, const Module* module );
55 
56 protected:
57 
59  float startAngle_;
60 
63 
66 
69 
72 
75 
78 
81 
84 
87 
88  // Slate input setting variables
89 
92 
98 
99  // Desired waypoint latitude
101 
102  // Desired waypoint latitude delta from the current latitude
103  // If specified with latitude, the two are added together
105 
106  // Desired waypoint longitude
108 
109  // Desired waypoint latitude delta from the current latitude
110  // If specified with latitude, the two are added together
112 
113  // Maximum radial error: if outside this range, drive straight to the
114  // circle perimeter
116 
122 
125 
128 
129  // Slate input measurements
130 
133 
136 
137  // Slate output variables
138 
139  // Sets the heading mode for HorizontalControl
141 
142  // Sets the bearing for HorizontalControl
144 
145  // Sets the latitude for HorizontalControl
147 
148  // Sets the longitude for HorizontalControl
150 
151 
152 private:
153  // Note that the copy constructor below is private and not given a body.
154  // Any attempt to call it will return a compiler error.
155  Circle( const Circle& old ); // disallow copy constructor
156 
157 
158 };
159 
160 #endif /*CIRCLE_H_*/
virtual ~Circle()
Definition: Circle.cpp:59
DataWriter * horizontalModeWriter_
Definition: Circle.h:140
Circle(const Str &prefix, const Module *module)
Definition: Circle.cpp:20
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: UniversalDataReader.h:26
float thresholdAngle_
One we've exceeded this angle around the circle, begin looking for a rotation.
Definition: Circle.h:62
float longitudeSetting_
Desired Longitude.
Definition: Circle.h:74
bool initialized_
Indicates initialization success.
Definition: Circle.h:86
SettingReader * northingsDeltaSettingReader_
Desired change in latitude to achieve, expressed as a distance.
Definition: Circle.h:121
Behavior is the abstract base class for components that implement mission behaviors and commands...
Definition: Behavior.h:32
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
bool runIfUnsatisfied()
runs only if unsatisfied
Definition: Circle.cpp:236
float angleSetting_
Desired Latitude.
Definition: Circle.h:68
float startAngle_
Starting angle of the vehicle around the circle.
Definition: Circle.h:59
Contains the Behavior class definition.
static Behavior * CreateBehavior(const Str &prefix, const Module *module)
Mission Component factory interface.
Definition: Circle.cpp:371
SettingReader * turnToPortSettingReader_
if true, vehicle turns to port around the circle.
Definition: Circle.h:127
Module is the abstract base class for a collection of Component objects that can be contained in a lo...
Definition: Module.h:45
UniversalDataReader * latitudeReader_
Current platform latitude.
Definition: Circle.h:132
SettingReader * longitudeSettingReader_
Definition: Circle.h:107
Replacement for standard template class string.
Definition: Str.h:12
Contains the Circle Behavior.
Definition: Circle.h:29
void initialize(void)
Initialize function.
Definition: Circle.cpp:63
float latitudeSetting_
Desired Latitude.
Definition: Circle.h:71
SettingReader * latitudeSettingReader_
Definition: Circle.h:100
bool passedThreshold_
True if we have exceeded startAngle + threshold.
Definition: Circle.h:65
DataWriter * bearingCmdWriter_
Definition: Circle.h:143
void uninitialize(void)
Uninit function.
Definition: Circle.cpp:364
bool turnToPortSetting_
If true, vehicle turns to port around the circle.
Definition: Circle.h:83
Reads values from mission settings.
Definition: SettingReader.h:26
SettingReader * longitudeDeltaSettingReader_
Definition: Circle.h:111
void run()
The actual "payload" of the component.
Definition: Circle.cpp:251
SettingReader * radiusSettingReader_
radius of the circle
Definition: Circle.h:124
SettingReader * eastingsDeltaSettingReader_
Desired change in longitude to achieve, expressed as a distance.
Definition: Circle.h:97
float maxErrorSetting_
Maximum error.
Definition: Circle.h:77
SettingReader * angleSettingReader_
angle of the circle to proceed through
Definition: Circle.h:91
Contains the Location class definition.
SettingReader * maxErrorSettingReader_
Definition: Circle.h:115
SettingReader * latitudeDeltaSettingReader_
Definition: Circle.h:104
DataWriter * longitudeCmdWriter_
Definition: Circle.h:149
bool isSatisfied()
Returns true when vehicle has "arrived" within the radius of the waypoint.
Definition: Circle.cpp:184
DataWriter * latitudeCmdWriter_
Definition: Circle.h:146
UniversalDataReader * longitudeReader_
Current platform longitude.
Definition: Circle.h:135
float radiusSetting_
Radius of the circle.
Definition: Circle.h:80