From 4435befefdbaedc85bd94a4240b0ebe9590fd391 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Wed, 9 Jan 2013 16:52:15 +0100 Subject: Added offset parameters for roll, pitch and yaw --- apps/attitude_estimator_ekf/attitude_estimator_ekf_params.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'apps/attitude_estimator_ekf/attitude_estimator_ekf_params.c') diff --git a/apps/attitude_estimator_ekf/attitude_estimator_ekf_params.c b/apps/attitude_estimator_ekf/attitude_estimator_ekf_params.c index 6879f9dc8..75a2479ed 100644 --- a/apps/attitude_estimator_ekf/attitude_estimator_ekf_params.c +++ b/apps/attitude_estimator_ekf/attitude_estimator_ekf_params.c @@ -72,6 +72,10 @@ PARAM_DEFINE_FLOAT(EKF_ATT_R5, 1e2f); PARAM_DEFINE_FLOAT(EKF_ATT_R6, 1e-1f); PARAM_DEFINE_FLOAT(EKF_ATT_R7, 1e-1f); PARAM_DEFINE_FLOAT(EKF_ATT_R8, 1e-1f); +/* offsets in roll, pitch and yaw of sensor plane and body */ +PARAM_DEFINE_FLOAT(ATT_ROLL_OFFS, 0.0f); +PARAM_DEFINE_FLOAT(ATT_PITCH_OFFS, 0.0f); +PARAM_DEFINE_FLOAT(ATT_YAW_OFFS, 0.0f); int parameters_init(struct attitude_estimator_ekf_param_handles *h) { @@ -99,6 +103,10 @@ int parameters_init(struct attitude_estimator_ekf_param_handles *h) h->r7 = param_find("EKF_ATT_R7"); h->r8 = param_find("EKF_ATT_R8"); + h->roll_off = param_find("ATT_ROLL_OFFS"); + h->pitch_off = param_find("ATT_PITCH_OFFS"); + h->yaw_off = param_find("ATT_YAW_OFFS"); + return OK; } @@ -127,5 +135,9 @@ int parameters_update(const struct attitude_estimator_ekf_param_handles *h, stru param_get(h->r7, &(p->r[7])); param_get(h->r8, &(p->r[8])); + param_get(h->roll_off, &(p->roll_off)); + param_get(h->pitch_off, &(p->pitch_off)); + param_get(h->yaw_off, &(p->yaw_off)); + return OK; } -- cgit v1.2.3