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

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)
 

Constructor & Destructor Documentation

DUNE::Control::CoarseAltitude::CoarseAltitude ( const Arguments args)
DUNE::Control::CoarseAltitude::~CoarseAltitude ( void  )

Destructor.

References DUNE::Memory::clear().

Member Function Documentation

void DUNE::Control::CoarseAltitude::activate ( void  )

Activate coarse altitude control.

void DUNE::Control::CoarseAltitude::deactivate ( void  )

Deactivate coarse altitude control.

References reset().

unsigned DUNE::Control::CoarseAltitude::getCorridor ( void  )
inline

Get current corridor number.

void DUNE::Control::CoarseAltitude::logParcel ( IMC::ControlParcel parcel,
float  desired_depth 
)

Log parcels with coarse altitude data.

Parameters
[out]parcelControlParcel message to use
[in]desired_depthcurrent 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.

Parameters
[in]timesteptime elapsed since last measurement was received
[in]depthnew depth value
[in]desired_depthcurrent depth reference
Returns
depth value to be used as a reference

References DUNE::Math::MultiMovingAverage< T >::mean(), DUNE::Control::CoarseAltitude::Arguments::sample_limit, and DUNE::Math::MultiMovingAverage< T >::update().

Collaboration diagram for DUNE::Control::CoarseAltitude:
Collaboration graph