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

Public Member Functions

 YoYoMotion (DUNE::Tasks::Task *task, float pitch, float z_ref, float amplitude, float variation)
 
float update (bool startup, float state_z, float pitch)
 
float stabilize (float desired_pitch, float current_pitch)
 
bool isBetweenBounds (float state_z)
 

Constructor & Destructor Documentation

DUNE::Control::YoYoMotion::YoYoMotion ( DUNE::Tasks::Task task,
float  pitch,
float  z_ref,
float  amplitude,
float  variation 
)
inline

Constructor.

Parameters
[in]taskpointer to calling task
[in]pitchpitch angle to use in motion
[in]z_refamplitude z reference for yoyo motion (negative if altitude)
[in]amplitudez reference amplitude for yoyo motion
[in]variationmaximum variation for the pitch angle

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::consume().

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::YoYo::Task::update().

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

Update yoyo motion.

Parameters
[in]startupwhether or not the yoyo motion is starting now
[in]state_zcurrent z position (negative if altitude)
[in]pitchcurrent pitch angle
Returns
new pitch command

References DUNE::Tasks::Task::debug().

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

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