DUNE: Uniform Navigational Environment  2.4.1
DUNE::Maneuvers::Elevate Class Reference

Detailed Description

Class to control elevator behavior.

Public Member Functions

 Elevate (const IMC::Elevator *maneuver, Maneuvers::Maneuver *task, float min_radius, float depth_tolerance)
 
void update (const IMC::EstimatedState *msg)
 
void updatePathControl (const IMC::PathControlState *msg)
 
bool isDone (void) const
 
int getElevatorDirection (void) const
 
float getVerticalError (float depth, float altitude)
 
float getVerticalError (const IMC::EstimatedState *msg)
 

Constructor & Destructor Documentation

DUNE::Maneuvers::Elevate::Elevate ( const IMC::Elevator maneuver,
Maneuvers::Maneuver task,
float  min_radius,
float  depth_tolerance 
)

Default constructor.

Parameters
[in]maneuverpointer to rows maneuver
[in]taskpointer to task object (debug and inf)
[in]min_radiusminimum radius to consider in maneuver
[in]depth_tolerancetolerance when elevating towards a new depth

References DUNE::IMC::CL_PATH, DUNE::IMC::DesiredPath::clear(), DUNE::IMC::DesiredPath::end_lat, DUNE::IMC::DesiredPath::end_lon, DUNE::IMC::Elevator::lat, DUNE::IMC::Elevator::lon, DUNE::IMC::DesiredPath::lradius, DUNE::IMC::Elevator::radius, DUNE::IMC::DesiredPath::speed, DUNE::IMC::Elevator::speed, DUNE::IMC::DesiredPath::speed_units, DUNE::IMC::Elevator::speed_units, and DUNE::Math::trimValueMod().

Member Function Documentation

int DUNE::Maneuvers::Elevate::getElevatorDirection ( void  ) const
inline

Get the elevator's direction.

Returns
positive if going up, negative going down, zero for undefined
float DUNE::Maneuvers::Elevate::getVerticalError ( float  depth,
float  altitude 
)
inline

Compute vertical error.

Parameters
[in]depthcurrent vehicle's depth
[in]altitudecurrent vehicle's altitude
Returns
difference between current z value being used and the reference

References DUNE::IMC::Elevator::end_z, DUNE::IMC::Elevator::end_z_units, and DUNE::IMC::Z_ALTITUDE.

Referenced by getVerticalError(), and update().

float DUNE::Maneuvers::Elevate::getVerticalError ( const IMC::EstimatedState msg)
inline

Compute vertical error.

Parameters
[in]msgpointer to EstimatedState message
Returns
difference between current z value being used and the reference

References DUNE::IMC::EstimatedState::alt, DUNE::IMC::EstimatedState::depth, and getVerticalError().

bool DUNE::Maneuvers::Elevate::isDone ( void  ) const
inline

Check if elevator has finished.

Returns
true if finished
void DUNE::Maneuvers::Elevate::updatePathControl ( const IMC::PathControlState msg)

Update object with PathControlState message.

Parameters
[in]msgpointer to PathControlState message

References DUNE::IMC::PathControlState::FL_LOITERING, and DUNE::IMC::PathControlState::flags.

Collaboration diagram for DUNE::Maneuvers::Elevate:
Collaboration graph