DUNE: Uniform Navigational Environment  2016.09.0
DUNE::Control::YoYoMotion Class Reference

Public Member Functions

 YoYoMotion (DUNE::Tasks::Task *task, float pitch, float z_ref, IMC::ZUnits zunits, float amplitude, float variation, float min_alt=5.0f, float max_depth=50.0f)
 
float update (bool startup, float depth, float alt, float pitch)
 
float stabilize (float desired_pitch, float current_pitch)
 
bool isBetweenBounds (float state_z)
 
void startedBraking (void)
 

Constructor & Destructor Documentation

DUNE::Control::YoYoMotion::YoYoMotion ( DUNE::Tasks::Task task,
float  pitch,
float  z_ref,
IMC::ZUnits  zunits,
float  amplitude,
float  variation,
float  min_alt = 5.0f,
float  max_depth = 50.0f 
)
inline

Constructor.

Parameters
[in]taskpointer to calling task
[in]pitchpitch angle to use in motion
[in]z_refz reference for yoyo motion
[in]z_unitsz reference units for yoyo motion
[in]amplitudez reference amplitude for yoyo motion
[in]variationmaximum variation for the pitch angle
[in]min_altminimum altitude reference admissible

Member Function Documentation

bool DUNE::Control::YoYoMotion::isBetweenBounds ( float  state_z)
inline

Check if vehicle is between yoyo bounds.

Parameters
[in]state_zcurrent z state
Returns
true if so, false otherwise

Referenced by Maneuver::CompassCalibration::Task::onPathControlState().

float DUNE::Control::YoYoMotion::stabilize ( float  desired_pitch,
float  current_pitch 
)
inline

Stabilize pitch in a certain value.

Parameters
[in]desired_pitchpitch angle at which to stabilize
[in]current_pitchcurrent pitch angle
Returns
pitch angle to command

Referenced by Maneuver::Multiplexer::YoYo::update().

void DUNE::Control::YoYoMotion::startedBraking ( void  )
inline

System is now braking.

Referenced by Maneuver::Multiplexer::YoYo::onBrake().

float DUNE::Control::YoYoMotion::update ( bool  startup,
float  depth,
float  alt,
float  pitch 
)
inline

Update yoyo motion.

Parameters
[in]startupwhether or not the yoyo motion is starting now
[in]depthcurrent depth position
[in]altitudecurrent altitude position
[in]pitchcurrent pitch angle
Returns
new pitch command

References DUNE::Tasks::Task::debug(), and DUNE::IMC::Z_DEPTH.

Referenced by Maneuver::Multiplexer::YoYo::update(), and Maneuver::CompassCalibration::Task::yoyoMotion().

Collaboration diagram for DUNE::Control::YoYoMotion:
Collaboration graph