DUNE: Uniform Navigational Environment  2016.05.0
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

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

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