34 #ifndef LEVELLINGUTIL_H
35 #define LEVELLINGUTIL_H
47 explicit LevellingUtil(
long measurementCount,
long measurementRate);
48 explicit LevellingUtil(
long accelMeasurementCount,
long accelMeasurementRate,
49 long gyroMeasurementCount,
long gyroMeasurementRate);
52 void progress(
long current,
long total);
61 void gyroMeasurementsUpdated(
UAVObject *obj);
62 void accelMeasurementsUpdated(
UAVObject *obj);
66 static const float G = 9.81f;
67 static const float ACCELERATION_SCALE = 0.004f * 9.81f;
69 QTimer m_timeoutTimer;
72 long m_receivedAccelUpdates;
73 long m_receivedGyroUpdates;
75 long m_accelMeasurementCount;
76 long m_gyroMeasurementCount;
77 long m_accelMeasurementRate;
78 long m_gyroMeasurementRate;
80 UAVObject::Metadata m_previousGyroMetaData;
81 UAVObject::Metadata m_previousAccelMetaData;
83 double m_accelerometerX;
84 double m_accelerometerY;
85 double m_accelerometerZ;
91 void startMeasurement();
92 void stopMeasurement();
96 #endif // LEVELLINGUTIL_H
LevellingUtil(long measurementCount, long measurementRate)
void timeout(QString message)
void done(accelGyroBias measuredBias)
void progress(long current, long total)