DUNE: Uniform Navigational Environment  2.5.0-rc1
DUNE::Control::SlopeData Class Reference

Public Member Functions

 SlopeData (unsigned fsamples, float min_range, float safe_pitch, float slope_hyst)
 
 ~SlopeData (void)
 
void reset (void)
 
void onDistance (const IMC::Distance *msg, const IMC::EstimatedState &state, IMC::ControlParcel &cparcel)
 
float updateSlopeTop (const IMC::EstimatedState &state)
 
float getFRange (void) const
 
float getSlope (void) const
 
float getDistanceToSlope (void) const
 
bool isRangeLow (void) const
 
bool isTooSteep (void)
 
bool isTopCleared (void) const
 
bool isSurface (const IMC::EstimatedState &state) const
 
bool isSlopeIncreasing (void) const
 
void renderSlopeInvalid (void)
 

Constructor & Destructor Documentation

DUNE::Control::SlopeData::SlopeData ( unsigned  fsamples,
float  min_range,
float  safe_pitch,
float  slope_hyst 
)
inline

Constructor.

Parameters
[in]fsamplesnumber of samples for forward range moving average
[in]min_rangeminimum admissible forward range for bottom tracking
[in]safe_pitchmax admissible pitch angle to perform bottom tracking
[in]slope_hystslope angle hysteresis value for safeness detection
DUNE::Control::SlopeData::~SlopeData ( void  )
inline

Deconstructor.

References DUNE::Memory::clear().

Member Function Documentation

float DUNE::Control::SlopeData::getDistanceToSlope ( void  ) const
inline

Get distance to slope top.

Returns
current distance to slope top
float DUNE::Control::SlopeData::getFRange ( void  ) const
inline

Get forward range.

Returns
forward range
float DUNE::Control::SlopeData::getSlope ( void  ) const
inline

Get current slope angle.

Returns
current slope angle
bool DUNE::Control::SlopeData::isRangeLow ( void  ) const
inline

Test if forward range is too low.

Returns
true if forward range is low
bool DUNE::Control::SlopeData::isSlopeIncreasing ( void  ) const
inline

Test if slope is increasing.

Returns
true if slope is increasing
bool DUNE::Control::SlopeData::isSurface ( const IMC::EstimatedState state) const
inline

Test if forward range could be the surface.

Parameters
[in]stateEstimatedState info
Returns
true if the reading is probably the surface

References DUNE::IMC::EstimatedState::depth, and DUNE::IMC::EstimatedState::theta.

bool DUNE::Control::SlopeData::isTooSteep ( void  )
inline

Test if slope is too steep.

Returns
true if slope is too steep
bool DUNE::Control::SlopeData::isTopCleared ( void  ) const
inline

Test if top is no longer an issue check if distance to slope top is increasing of if distance to slope top is very short.

Returns
true if cleared
void DUNE::Control::SlopeData::onDistance ( const IMC::Distance msg,
const IMC::EstimatedState state,
IMC::ControlParcel cparcel 
)
inline

Consume a Distance message.

Parameters
[in]msgsonar distance message
[in]stateestimatedstate message
[in]cparcelcontrol parcel message

References DUNE::IMC::Distance::beam_config, DUNE::IMC::Distance::DV_VALID, DUNE::IMC::Message::getSourceEntity(), DUNE::IMC::Distance::location, DUNE::IMC::Distance::validity, and DUNE::IMC::Distance::value.

Referenced by DUNE::Control::BottomTracker::onDistance().

void DUNE::Control::SlopeData::renderSlopeInvalid ( void  )
inline

Flag slope top as invalid.

void DUNE::Control::SlopeData::reset ( void  )
inline

Reset the object.

Referenced by DUNE::Control::BottomTracker::reset().

float DUNE::Control::SlopeData::updateSlopeTop ( const IMC::EstimatedState state)
inline

Update slope top.

Parameters
[in]stateestimatedstate message
Returns
distance to slope's top
Collaboration diagram for DUNE::Control::SlopeData:
Collaboration graph