diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-09 16:52:15 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-09 16:52:15 +0100 |
commit | 4435befefdbaedc85bd94a4240b0ebe9590fd391 (patch) | |
tree | fb18844f7ca29d5521139aa4090640b4b61aa7d8 /apps/attitude_estimator_ekf/attitude_estimator_ekf_params.c | |
parent | 8cc9fb9e2c47af213962ece3be3f883dd5cd71ea (diff) | |
download | px4-firmware-4435befefdbaedc85bd94a4240b0ebe9590fd391.tar.gz px4-firmware-4435befefdbaedc85bd94a4240b0ebe9590fd391.tar.bz2 px4-firmware-4435befefdbaedc85bd94a4240b0ebe9590fd391.zip |
Added offset parameters for roll, pitch and yaw
Diffstat (limited to 'apps/attitude_estimator_ekf/attitude_estimator_ekf_params.c')
-rw-r--r-- | apps/attitude_estimator_ekf/attitude_estimator_ekf_params.c | 12 |
1 files changed, 12 insertions, 0 deletions
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; } |