DUNE: Uniform Navigational Environment  2019.02.1
DUNE::Monitors::ServoPositionMonitor< T > Class Template Reference

Public Member Functions

 ServoPositionMonitor (const T error_threshold, const T rate_factor, const double detection_delay, const unsigned average_samples, const T max_rotation)
 
 ~ServoPositionMonitor (void)
 
bool updateAndTest (const T position, const T command, std::string *description)
 

Constructor & Destructor Documentation

template<typename T >
DUNE::Monitors::ServoPositionMonitor< T >::ServoPositionMonitor ( const T  error_threshold,
const T  rate_factor,
const double  detection_delay,
const unsigned  average_samples,
const T  max_rotation 
)
inline

Constructor.

Parameters
[in]error_thresholdvalue above which a position fault detection will trigger
[in]rate_factorfactor to compare between accumulated difference in position and command sent to servo
[in]detection_delaydelay in seconds before a detection is triggered
[in]average_samplesnumber of samples to use in the delayed trigger
[in]max_rotationmaximum rotation rate of the servo in radians per second
template<typename T >
DUNE::Monitors::ServoPositionMonitor< T >::~ServoPositionMonitor ( void  )
inline

Destructor.

References DUNE::Memory::clear().

Member Function Documentation

template<typename T >
bool DUNE::Monitors::ServoPositionMonitor< T >::updateAndTest ( const T  position,
const T  command,
std::string *  description 
)
inline

Update function with position and command values Describe fault detected.

Parameters
[in]positionposition measurement to be used in the detection
[in]commandset position command to be used in the detection
[out]descriptiondescription of the fault detected, if any
Returns
true if a fault was detected and false otherwise

References DUNE::Math::Angles::degrees(), DUNE::Time::Clock::get(), DUNE::Utils::String::str(), and DUNE::Math::trimValue().

Collaboration diagram for DUNE::Monitors::ServoPositionMonitor< T >:
Collaboration graph