DUNE: Uniform Navigational Environment
2019.02.0
|
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onUpdateParameters (void) |
void | onResourceAcquisition (void) |
void | onResourceRelease (void) |
void | onResourceInitialization (void) |
void | consume (const IMC::MagneticField *msg) |
void | setOutputFrequency (uint8_t frequency) |
void | getHardIronFactors (void) |
void | setHardIronFactors (void) |
void | decodeOutputData (const UCTK::Frame &frame) |
void | decodeOutputRaw (const UCTK::Frame &frame) |
void | decode (const UCTK::Frame &frame) |
void | readInput (void) |
uint8_t | extractRotatedVector (const uint8_t *ptr, Matrix &vector) |
void | reportEntityState (void) |
void | onMain (void) |
Public Attributes | |
IMC::AngularVelocity | m_ang_vel |
IMC::Acceleration | m_accel |
IMC::EulerAnglesDelta | m_delt_ang |
IMC::VelocityDelta | m_delt_vel |
IMC::EulerAngles | m_euler |
IMC::MagneticField | m_magn |
IMC::Temperature | m_temp |
SerialPort * | m_uart |
UCTK::Interface * | m_ctl |
UCTK::Parser | m_parser |
UCTK::Frame | m_frame |
uint8_t | m_buffer [128] |
unsigned | m_calib_eid |
Math::Matrix | m_rotation |
Counter< double > | m_wdog |
Counter< double > | m_state_timer |
ErrorCounts | m_err_counts |
double | m_hard_iron [c_axes_count] |
size_t | m_sample_count |
size_t | m_faults_count |
size_t | m_timeout_count |
Arguments | m_args |
|
inline |
References Sensors::LIMU::Arguments::calib_time, Sensors::LIMU::Arguments::hard_iron, m_args, Sensors::LIMU::Arguments::output_frq, Sensors::LIMU::Arguments::pwr_name, Sensors::LIMU::Arguments::raw_data, Sensors::LIMU::Arguments::rotation_mx, Sensors::LIMU::Arguments::timeout_error, Sensors::LIMU::Arguments::timeout_failure, and Sensors::LIMU::Arguments::uart_dev.
|
inline |
References Sensors::LIMU::Arguments::hard_iron, and m_args.
|
inline |
Decode data frame.
[in] | frame | data frame. |
References decodeOutputData(), decodeOutputRaw(), Sensors::LIMU::PKT_ID_OUTPUT_DATA, and Sensors::LIMU::PKT_ID_OUTPUT_RAW.
Referenced by readInput().
|
inline |
Decode output data frame.
[in] | frame | data frame. |
References Sensors::LIMU::ERR_FLAG_PROC_OVR, Sensors::LIMU::ERR_FLAG_SENS_OVR, Sensors::LIMU::ERR_FLAG_SPI_ERR, Sensors::LIMU::ERR_FLAG_WDOG_TOUT, extractRotatedVector(), Sensors::LIMU::ErrorCounts::increment(), m_accel, m_ang_vel, m_delt_ang, m_delt_vel, m_err_counts, m_euler, m_magn, m_rotation, m_sample_count, m_temp, m_wdog, DUNE::Time::Counter< T >::reset(), DUNE::Math::Matrix::toDCM(), and DUNE::Math::transpose().
Referenced by decode().
|
inline |
|
inline |
References m_rotation.
Referenced by decodeOutputData().
|
inline |
Get current Hard-Iron calibration parameters.
References m_ctl, m_hard_iron, and Sensors::LIMU::PKT_ID_HARD_IRON.
Referenced by setHardIronFactors().
|
inline |
References m_timeout_count, m_uart, readInput(), and reportEntityState().
|
inline |
Acquire resources.
References m_args, m_ctl, m_uart, Sensors::LIMU::Arguments::pwr_name, and Sensors::LIMU::Arguments::uart_dev.
|
inline |
Initialize resources.
References m_args, Sensors::LIMU::Arguments::output_frq, setHardIronFactors(), and setOutputFrequency().
|
inline |
|
inline |
References Sensors::LIMU::Arguments::hard_iron, m_args, m_hard_iron, m_rotation, m_wdog, Sensors::LIMU::Arguments::output_frq, Sensors::LIMU::Arguments::raw_data, Sensors::LIMU::Arguments::rotation_mx, setHardIronFactors(), setOutputFrequency(), DUNE::Time::Counter< T >::setTop(), Sensors::LIMU::Arguments::timeout_error, and DUNE::Math::transpose().
|
inline |
|
inline |
|
inline |
Set Hard-Iron calibration parameters.
References getHardIronFactors(), Sensors::LIMU::Arguments::hard_iron, m_args, m_ctl, m_hard_iron, and Sensors::LIMU::PKT_ID_HARD_IRON.
Referenced by onResourceInitialization(), and onUpdateParameters().
|
inline |
Define sensor output frequency.
[in] | frequency | desired frequency. |
References m_args, m_ctl, Sensors::LIMU::PKT_ID_OUTPUT_CONF, and Sensors::LIMU::Arguments::raw_data.
Referenced by onResourceInitialization(), and onUpdateParameters().
IMC::Acceleration Sensors::LIMU::Task::m_accel |
Acceleration.
Referenced by decodeOutputData().
IMC::AngularVelocity Sensors::LIMU::Task::m_ang_vel |
Angular velocity.
Referenced by decodeOutputData().
Arguments Sensors::LIMU::Task::m_args |
Task arguments.
Referenced by consume(), onResourceAcquisition(), onResourceInitialization(), onUpdateParameters(), reportEntityState(), setHardIronFactors(), setOutputFrequency(), and Task().
uint8_t Sensors::LIMU::Task::m_buffer[128] |
Scratch buffer.
Referenced by readInput().
unsigned Sensors::LIMU::Task::m_calib_eid |
Compass Calibration maneuver entity id.
UCTK::Interface* Sensors::LIMU::Task::m_ctl |
Control Interface.
Referenced by getHardIronFactors(), onResourceAcquisition(), onResourceRelease(), setHardIronFactors(), and setOutputFrequency().
IMC::EulerAnglesDelta Sensors::LIMU::Task::m_delt_ang |
Delta angles.
Referenced by decodeOutputData().
IMC::VelocityDelta Sensors::LIMU::Task::m_delt_vel |
Delta velocity.
Referenced by decodeOutputData().
ErrorCounts Sensors::LIMU::Task::m_err_counts |
Error counts.
Referenced by decodeOutputData().
IMC::EulerAngles Sensors::LIMU::Task::m_euler |
Euler Angles.
Referenced by decodeOutputData().
size_t Sensors::LIMU::Task::m_faults_count |
Faults count.
Referenced by reportEntityState().
UCTK::Frame Sensors::LIMU::Task::m_frame |
Scratch frame.
Referenced by readInput().
double Sensors::LIMU::Task::m_hard_iron[c_axes_count] |
Rotated hard-iron calibration parameters.
Referenced by getHardIronFactors(), onUpdateParameters(), and setHardIronFactors().
IMC::MagneticField Sensors::LIMU::Task::m_magn |
Magnetic Field.
Referenced by decodeOutputData().
UCTK::Parser Sensors::LIMU::Task::m_parser |
UCTK parser.
Referenced by readInput().
Math::Matrix Sensors::LIMU::Task::m_rotation |
Rotation Matrix to correct mounting position.
Referenced by decodeOutputData(), extractRotatedVector(), and onUpdateParameters().
size_t Sensors::LIMU::Task::m_sample_count |
Sample count.
Referenced by decodeOutputData(), and reportEntityState().
Counter<double> Sensors::LIMU::Task::m_state_timer |
Entity state timer.
Referenced by reportEntityState().
IMC::Temperature Sensors::LIMU::Task::m_temp |
Temperature.
Referenced by decodeOutputData().
size_t Sensors::LIMU::Task::m_timeout_count |
Timeout count.
Referenced by onMain(), and reportEntityState().
SerialPort* Sensors::LIMU::Task::m_uart |
Serial port device.
Referenced by onMain(), onResourceAcquisition(), onResourceRelease(), and readInput().
Counter<double> Sensors::LIMU::Task::m_wdog |
Watchdog.
Referenced by decodeOutputData(), onUpdateParameters(), and reportEntityState().