From ddb94ceba8f8813a8d434d00daf42a232e58cbfc Mon Sep 17 00:00:00 2001 From: Anton Babushkin Date: Mon, 10 Mar 2014 23:39:31 +0400 Subject: attitude_estimator_ekf: hotfix, do mag declination rotation matrix initialization --- src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp') 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]; -- cgit v1.2.3