AHRS based on MatrixPilot DCM algorithm; ported from Pololu MinIMU-9 example code in turn based on ArduPilot 1.5 built for sensor gy_80
Fork of DCM_AHRS by
Diff: DCM.cpp
- Revision:
- 4:4c6ffd1a88ce
- Parent:
- 3:ef027800a8d5
- Child:
- 5:d5ecdb82c17b
--- a/DCM.cpp Wed Jul 24 02:52:28 2013 +0000 +++ b/DCM.cpp Fri Jul 26 02:42:14 2013 +0000 @@ -3,8 +3,6 @@ #include "math.h" #include "Sensors.h" -#include "mbed.h" -//Serial pc3(USBTX, USBRX); #define MAG_SKIP 1 @@ -158,8 +156,9 @@ yaw = RAD2DEG(atan2(dcm[1][0],dcm[0][0])); } -void DCM::Update_step() +void DCM::Update_step(float dt) { + G_Dt = dt; Read_Accel(Accel_Vector); Read_Gyro(Gyro_Vector); if (--update_count == 0) {