aboutsummaryrefslogtreecommitdiff
path: root/src/modules/attitude_estimator_ekf
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-03-10 23:39:31 +0400
committerAnton Babushkin <anton.babushkin@me.com>2014-03-10 23:39:31 +0400
commitddb94ceba8f8813a8d434d00daf42a232e58cbfc (patch)
treed743ddbdace7b0545895063db1e51e9ddad23959 /src/modules/attitude_estimator_ekf
parent368c2390cf98980e317171d2a44622f1b6ec9c33 (diff)
downloadpx4-firmware-ddb94ceba8f8813a8d434d00daf42a232e58cbfc.tar.gz
px4-firmware-ddb94ceba8f8813a8d434d00daf42a232e58cbfc.tar.bz2
px4-firmware-ddb94ceba8f8813a8d434d00daf42a232e58cbfc.zip
attitude_estimator_ekf: hotfix, do mag declination rotation matrix initialization
Diffstat (limited to 'src/modules/attitude_estimator_ekf')
-rwxr-xr-xsrc/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp b/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp
index 620185fb7..00bd23f83 100755
--- a/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp
+++ b/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp
@@ -477,6 +477,9 @@ const unsigned int loop_interval_alarm = 6500; // loop interval in microseconds
dt = 0.005f;
parameters_update(&ekf_param_handles, &ekf_params);
+ /* update mag declination rotation matrix */
+ R_decl.from_euler(0.0f, 0.0f, ekf_params.mag_decl);
+
x_aposteriori_k[0] = z_k[0];
x_aposteriori_k[1] = z_k[1];
x_aposteriori_k[2] = z_k[2];