DUNE: Uniform Navigational Environment  2019.02.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)
 
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

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, DUNE::IMC::Elevator::end_z, DUNE::IMC::Elevator::end_z_units, DUNE::IMC::DesiredPath::FL_CCLOCKW, DUNE::IMC::Elevator::flags, DUNE::IMC::Elevator::FLG_CURR_POS, getVerticalError(), and DUNE::IMC::Z_DEPTH.

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)
Collaboration diagram for DUNE::Maneuvers::Elevate:
Collaboration graph