DUNE: Uniform Navigational Environment
2.4.2
|
Motor simulator task
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onResourceRelease (void) |
void | onResourceInitialization (void) |
void | consume (const IMC::SetThrusterActuation *msg) |
void | task (void) |
Public Attributes | |
MovingAverage< double > * | m_avg_motor |
IMC::Rpm | m_rpm |
int16_t | m_rpm_new |
Arguments | m_args |
|
inline |
|
inline |
|
inline |
Initialize resources.
References Simulators::Motor::Arguments::avg_samples, m_args, m_avg_motor, m_rpm, and m_rpm_new.
|
inline |
Release resources.
References m_avg_motor.
|
inline |
References m_avg_motor, m_rpm, m_rpm_new, and DUNE::Math::MovingAverage< T >::update().
Arguments Simulators::Motor::Task::m_args |
Task arguments.
Referenced by consume(), onResourceInitialization(), and Task().
MovingAverage<double>* Simulators::Motor::Task::m_avg_motor |
Moving average filter for frequency of rotation.
Referenced by onResourceInitialization(), onResourceRelease(), and task().
IMC::Rpm Simulators::Motor::Task::m_rpm |
Filtered motor frequency of rotation (RPM).
Referenced by onResourceInitialization(), and task().
int16_t Simulators::Motor::Task::m_rpm_new |
New frequency of rotation value.
Referenced by consume(), onResourceInitialization(), and task().