DUNE: Uniform Navigational Environment
2.4.0
|
Classes | |
struct | Arguments |
Public Member Functions | |
CoarseAltitude (const Arguments *args) | |
~CoarseAltitude (void) | |
void | reset (void) |
void | activate (void) |
void | deactivate (void) |
unsigned | getCorridor (void) |
float | update (float timestep, float depth, float desired_depth) |
void | logParcel (IMC::ControlParcel &parcel, float desired_depth) |
DUNE::Control::CoarseAltitude::CoarseAltitude | ( | const Arguments * | args | ) |
Constructor.
References reset(), DUNE::Control::CoarseAltitude::Arguments::sample_limit, and DUNE::Control::CoarseAltitude::Arguments::wsizes.
DUNE::Control::CoarseAltitude::~CoarseAltitude | ( | void | ) |
Destructor.
References DUNE::Memory::clear().
void DUNE::Control::CoarseAltitude::activate | ( | void | ) |
Activate coarse altitude control.
void DUNE::Control::CoarseAltitude::deactivate | ( | void | ) |
Deactivate coarse altitude control.
References reset().
|
inline |
Get current corridor number.
void DUNE::Control::CoarseAltitude::logParcel | ( | IMC::ControlParcel & | parcel, |
float | desired_depth | ||
) |
Log parcels with coarse altitude data.
[out] | parcel | ControlParcel message to use |
[in] | desired_depth | current untreated depth reference for comparison |
References DUNE::IMC::ControlParcel::a, DUNE::IMC::ControlParcel::d, DUNE::IMC::ControlParcel::i, DUNE::IMC::ControlParcel::p, and DUNE::Control::CoarseAltitude::Arguments::upper_gap.
void DUNE::Control::CoarseAltitude::reset | ( | void | ) |
Reset variables.
References DUNE::Math::MultiMovingAverage< T >::clear().
Referenced by CoarseAltitude(), and deactivate().
float DUNE::Control::CoarseAltitude::update | ( | float | timestep, |
float | depth, | ||
float | desired_depth | ||
) |
Update object with new depth value.
[in] | timestep | time elapsed since last measurement was received |
[in] | depth | new depth value |
[in] | desired_depth | current depth reference |
References DUNE::Math::MultiMovingAverage< T >::mean(), DUNE::Control::CoarseAltitude::Arguments::sample_limit, and DUNE::Math::MultiMovingAverage< T >::update().