DUNE: Uniform Navigational Environment  2019.02.1
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)
 
bool onDistance (const IMC::Distance *msg, const IMC::EstimatedState &state, IMC::ControlParcel &cparcel)
 
float updateSlopeTop (const IMC::EstimatedState &state)
 
float getFRange (void)
 
float getSlope (void) const
 
float getDistanceToSlope (void) const
 
bool isRangeLow (float pitch=0.0)
 
bool isTooSteep (void)
 
bool isTopCleared (void) const
 
bool isSurface (const IMC::EstimatedState &state)
 
bool isSlopeIncreasing (void)
 
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

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

float DUNE::Control::SlopeData::getFRange ( void  )
inline

Get forward range.

Returns
forward range

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

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

Get current slope angle.

Returns
current slope angle

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

bool DUNE::Control::SlopeData::isRangeLow ( float  pitch = 0.0)
inline

Test if forward range is too low.

Parameters
[in]pitchcurrent pitch angle
Returns
true if forward range is low

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

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

Test if slope is increasing.

Returns
true if slope is increasing

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

bool DUNE::Control::SlopeData::isSurface ( const IMC::EstimatedState state)
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.

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

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

Test if slope is too steep.

Returns
true if slope is too steep

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

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

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

bool 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
Returns
true if slope was estimated, false otherwise.

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::reset ( void  )
inline

Reset the object.

References DUNE::Memory::clear().

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

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

Collaboration diagram for DUNE::Control::SlopeData:
Collaboration graph