LRAUV  revA
Waypoint.h
Go to the documentation of this file.
1 
12 #ifndef WAYPOINT_H_
13 #define WAYPOINT_H_
14 
15 #include "component/Behavior.h"
16 #include "data/Location.h"
17 
19 
29 class Waypoint : public Behavior
30 {
31 public:
32 
33  Waypoint( const Str& prefix, const Module* module );
34 
35  virtual ~Waypoint();
36 
38  void initialize( void );
39 
41  bool isSatisfied();
42 
44  bool runIfUnsatisfied();
45 
47  void run();
48 
50  void uninitialize( void );
51 
53  static Behavior* CreateBehavior( const Str& prefix, const Module* module );
54 
55 protected:
56 
59 
62 
64  float bearing_;
65 
68 
72 
75 
79 
83 
86 
89 
90  // Slate input setting variables
91 
95 
99 
103 
109 
110  // Desired waypoint latitude
112 
113  // Desired waypoint latitude delta from the current latitude
114  // If specified with latitude, the two are added together
116 
117  // Desired waypoint longitude
119 
120  // Desired waypoint latitude delta from the current latitude
121  // If specified with latitude, the two are added together
123 
129 
133 
134  // Slate input measurements
135 
138 
141 
144 
145  // Slate output variables
146 
147  // Sets the heading mode for HeadingControl
149 
150  // Sets the waypoint latitude for HeadingControl
152 
153  // Sets the waypoint longitude for HeadingControl
155 
156  // Computes the bearing to the waypoint
158 
159 private:
160  // Note that the copy constructor below is private and not given a body.
161  // Any attempt to call it will return a compiler error.
162  Waypoint( const Waypoint& old ); // disallow copy constructor
163 
164 
165 };
166 
167 #endif /*WAYPOINT_H_*/
UniversalDataReader * distanceWrtSeaReader_
Distance vehicle has travelled through the water.
Definition: Waypoint.h:143
bool startOverLine_
Is our starting point latitude > than the latitude of the starting longitude on the crossing line...
Definition: Waypoint.h:78
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: UniversalDataReader.h:26
static Behavior * CreateBehavior(const Str &prefix, const Module *module)
Mission Component factory interface.
Definition: Waypoint.cpp:310
virtual ~Waypoint()
Definition: Waypoint.cpp:60
bool runIfUnsatisfied()
runs only if unsatisfied
Definition: Waypoint.cpp:268
int waterFrameSetting_
If true, attempt to drive in water frame of reference (no attempt to fix for crosstrack errors...
Definition: Waypoint.h:71
float perpendicularSlope_
Slope for crossing line (thru wapoint)
Definition: Waypoint.h:74
SettingReader * latitudeSettingReader_
Definition: Waypoint.h:111
float endDistanceWrtSea_
When in waterFrame mode, this is the value of platform_distance_wrt_sea_water when the endpoint is re...
Definition: Waypoint.h:82
SettingReader * eastingsDeltaSettingReader_
Desired change in longitude to achieve, expressed as a distance.
Definition: Waypoint.h:108
Behavior is the abstract base class for components that implement mission behaviors and commands...
Definition: Behavior.h:32
Contains the Waypoint Behavior/Command.
Definition: Waypoint.h:29
double latitudeSetting_
Desired Latitude.
Definition: Waypoint.h:58
bool latlonSettingReal_
Indicates an actual lat/lon setting as opposed to one that is nan or one that isn't returned by the r...
Definition: Waypoint.h:88
SettingReader * longitudeSettingReader_
Definition: Waypoint.h:118
Waypoint(const Str &prefix, const Module *module)
Definition: Waypoint.cpp:20
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
SettingReader * northingsDeltaSettingReader_
Desired change in latitude to achieve, expressed as a distance.
Definition: Waypoint.h:128
SettingReader * longitudeDeltaSettingReader_
Definition: Waypoint.h:122
Contains the Behavior class definition.
float captureRadiusSetting_
Either a valid capture Radius or NaN.
Definition: Waypoint.h:67
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
SettingReader * distanceDeltaBearingSettingReader_
bearing of distance from the nominal waypoint set by other settings.
Definition: Waypoint.h:102
SettingReader * distanceDeltaSettingReader_
distance from the nominal waypoint set by other settings.
Definition: Waypoint.h:98
DataWriter * horizontalModeWriter_
Definition: Waypoint.h:148
SettingReader * waterFrameSettingReader_
If true, attempt to drive in water frame of reference (no attempt to fix for crosstrack errors...
Definition: Waypoint.h:132
DataWriter * longitudeCmdWriter_
Definition: Waypoint.h:154
UniversalDataReader * longitudeReader_
Current platform longitude.
Definition: Waypoint.h:140
Reads values from mission settings.
Definition: SettingReader.h:26
float bearing_
Desired Bearing.
Definition: Waypoint.h:64
DataWriter * latitudeCmdWriter_
Definition: Waypoint.h:151
void run()
The actual "payload" of the component.
Definition: Waypoint.cpp:288
bool initialized_
Indicates initialization success.
Definition: Waypoint.h:85
void uninitialize(void)
Uninit function.
Definition: Waypoint.cpp:301
Contains the Location class definition.
void initialize(void)
Initialize function.
Definition: Waypoint.cpp:64
UniversalDataReader * latitudeReader_
Current platform latitude.
Definition: Waypoint.h:137
DataWriter * bearingCmdWriter_
Definition: Waypoint.h:157
double longitudeSetting_
Desired Longitude.
Definition: Waypoint.h:61
SettingReader * captureRadiusSettingReader_
radius of the circle that defines that the vehicle has reached the waypoint
Definition: Waypoint.h:94
bool isSatisfied()
Returns true when vehicle has "arrived" at the waypoint.
Definition: Waypoint.cpp:206
SettingReader * latitudeDeltaSettingReader_
Definition: Waypoint.h:115