LRAUV  revA
Lane.h
Go to the documentation of this file.
1 
12 #ifndef LANE_H_
13 #define LANE_H_
14 
15 #include "component/Behavior.h"
16 #include "data/Location.h"
17 
19 
35 class Lane : public Behavior
36 {
37 public:
38 
39  Lane( const Str& prefix, const Module* module );
40 
41  virtual ~Lane();
42 
44  void readSettings();
45 
47  void initialize( void );
48 
51  bool isSatisfied();
52 
54  bool runIfUnsatisfied();
55 
57  void run();
58 
60  void uninitialize( void );
61 
63  static Behavior* CreateBehavior( const Str& prefix, const Module* module );
64 
65 protected:
66 
69 
72 
75 
78 
81 
84 
86  double latitude_;
87 
89  double longitude_;
90 
93 
97 
100 
101  // Slate input setting variables
102 
103  // Desired bearing
105 
106  // Desired distance
108 
111 
114 
115  // Slate input measurements
116 
117  // Current platform latitude
119 
120  // Current platform longitude
122 
123  // Current platform heading
125 
126  // Gets the horizontal mode for HorizontalControl
128 
129  // Gets the heading for HorizontalControl
131 
132  // Gets the bearing for HorizontalControl
134 
135  // Slate output variables
136 
137  // Sets the horizontal mode for HorizontalControl
139 
140  // Sets the heading for HorizontalControl
142 
143  // Carries out behavior on parameters
144  void doRun();
145 
146  // Determines if behavior is satisfied
147  bool calcSatisfied();
148 
149  // Reads in parameters used by doRun and calcSatisfied
150  bool readParams();
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  Lane( const Lane& old ); // disallow copy constructor
156 
157 
158 };
159 
160 #endif /*LANE_H_*/
bool startOverLine_
Is our starting point latitude > than the latitude of the starting longitude on the crossing line...
Definition: Lane.h:96
void run()
The actual "payload" of the component.
Definition: Lane.cpp:153
DataReader * headingCmdReader_
Definition: Lane.h:130
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: UniversalDataReader.h:26
SettingReader * widthSettingReader_
Width of the lane.
Definition: Lane.h:110
DataWriter * headingCmdWriter_
Definition: Lane.h:141
Contains the Lane Behavior/Command.
Definition: Lane.h:35
void initialize(void)
Initialize function.
Definition: Lane.cpp:74
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: DataReader.h:30
bool runIfUnsatisfied()
runs only if unsatisfied
Definition: Lane.cpp:161
bool calcSatisfied()
Definition: Lane.cpp:211
bool initialized_
Indicates initialization success.
Definition: Lane.h:99
Behavior is the abstract base class for components that implement mission behaviors and commands...
Definition: Behavior.h:32
UniversalDataReader * headingReader_
Definition: Lane.h:124
static Behavior * CreateBehavior(const Str &prefix, const Module *module)
Mission Component factory interface.
Definition: Lane.cpp:303
float widthSetting_
Desired width.
Definition: Lane.h:80
UniversalDataReader * longitudeReader_
Definition: Lane.h:121
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
DataReader * horizontalModeReader_
Definition: Lane.h:127
UniversalDataReader * latitudeReader_
Definition: Lane.h:118
Contains the Behavior class definition.
void doRun()
Definition: Lane.cpp:228
Module is the abstract base class for a collection of Component objects that can be contained in a lo...
Definition: Module.h:45
float bearingSetting_
Desired Bearing.
Definition: Lane.h:68
bool readParams()
Definition: Lane.cpp:176
Replacement for standard template class string.
Definition: Str.h:12
DataReader * bearingCmdReader_
Definition: Lane.h:133
DataWriter * horizontalModeWriter_
Definition: Lane.h:138
void uninitialize(void)
Uninit function.
Definition: Lane.cpp:295
virtual ~Lane()
Definition: Lane.cpp:57
Reads values from mission settings.
Definition: SettingReader.h:26
float offsetSetting_
Desired offset.
Definition: Lane.h:83
double longitude_
Current Longitude.
Definition: Lane.h:89
SettingReader * bearingSettingReader_
Definition: Lane.h:104
bool isSatisfied()
Returns true when vehicle has "arrived" within the angle of the waypoint.
Definition: Lane.cpp:148
float perpendicularSlope_
Slope for crossing line (thru wapoint)
Definition: Lane.h:92
Lane(const Str &prefix, const Module *module)
Definition: Lane.cpp:20
Contains the Location class definition.
float distanceSetting_
Desired Distance.
Definition: Lane.h:71
SettingReader * offsetSettingReader_
Offset of the lane.
Definition: Lane.h:113
double latitude_
Current Latitude.
Definition: Lane.h:86
double longitudeSetting_
Desired (calculated) Longitude.
Definition: Lane.h:77
void readSettings()
Read settings.
Definition: Lane.cpp:60
SettingReader * distanceSettingReader_
Definition: Lane.h:107
double latitudeSetting_
Desired (calculated) Latitude.
Definition: Lane.h:74