3#include <QtCore/QMutex>
85 void _startCalibration(CalType calType);
88 void _accelSideTick();
90 int _doneCount()
const;
94 mutable QMutex _mutex;
95 CalType _calType = CalType::None;
96 int _requestedPose = -1;
98 int _sideTickCount = 0;
99 int _finishTickCount = -1;
102 static constexpr int kTicksPerSide = 5;
103 static constexpr int kTicksToFinish = 10;
Simulates the PX4 commander magnetometer and accelerometer calibration protocols for MockLink.
static constexpr int kSideCount
void startMagCalibration()
bool calibrationActive() const
Pose
Vehicle poses. Order matches the PX4 detect_orientation_return enum.
@ Right
"right" accel [ 0, -g, 0 ]
@ Left
"left" accel [ 0, g, 0 ]
@ NoseDown
"front" accel [ -g, 0, 0 ]
@ RightSideUp
"down" accel [ 0, 0, -g ]
@ UpsideDown
"up" accel [ 0, 0, g ]
@ TailDown
"back" accel [ g, 0, 0 ]
void run10HzTasks()
Called by MockLink::run10HzTasks on the worker thread.
void startAccelCalibration()