aboutsummaryrefslogtreecommitdiff
path: root/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c')
-rw-r--r--apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c b/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c
index 6368c5157..10405758f 100644
--- a/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c
+++ b/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c
@@ -427,6 +427,13 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
att.pitchspeed = x_aposteriori[1];
att.yawspeed = x_aposteriori[2];
+ /* copy offsets */
+ memcpy(&att.rate_offsets, &(x_aposteriori[3]), sizeof(att.rate_offsets));
+
+ /* copy rotation matrix */
+ memcpy(&att.R, Rot_matrix, sizeof(Rot_matrix));
+ att.R_valid = true;
+
// Broadcast
orb_publish(ORB_ID(vehicle_attitude), pub_att, &att);
}