forked from Archive/PX4-Autopilot
Merge with att_fix
This commit is contained in:
parent
7bb78a4f9b
commit
a25d68440d
|
@ -44,42 +44,42 @@
|
||||||
/* Extended Kalman Filter covariances */
|
/* Extended Kalman Filter covariances */
|
||||||
|
|
||||||
/* gyro process noise */
|
/* gyro process noise */
|
||||||
PARAM_DEFINE_FLOAT(EKF_ATT_V2_Q0, 1e-4f);
|
PARAM_DEFINE_FLOAT(EKF_ATT_V3_Q0, 1e-4f);
|
||||||
PARAM_DEFINE_FLOAT(EKF_ATT_V2_Q1, 0.08f);
|
PARAM_DEFINE_FLOAT(EKF_ATT_V3_Q1, 0.08f);
|
||||||
PARAM_DEFINE_FLOAT(EKF_ATT_V2_Q2, 0.009f);
|
PARAM_DEFINE_FLOAT(EKF_ATT_V3_Q2, 0.009f);
|
||||||
/* gyro offsets process noise */
|
/* gyro offsets process noise */
|
||||||
PARAM_DEFINE_FLOAT(EKF_ATT_V2_Q3, 0.005f);
|
PARAM_DEFINE_FLOAT(EKF_ATT_V3_Q3, 0.005f);
|
||||||
PARAM_DEFINE_FLOAT(EKF_ATT_V2_Q4, 0.0f);
|
PARAM_DEFINE_FLOAT(EKF_ATT_V3_Q4, 0.0f);
|
||||||
|
|
||||||
/* gyro measurement noise */
|
/* gyro measurement noise */
|
||||||
PARAM_DEFINE_FLOAT(EKF_ATT_V2_R0, 0.0008f);
|
PARAM_DEFINE_FLOAT(EKF_ATT_V3_R0, 0.0008f);
|
||||||
PARAM_DEFINE_FLOAT(EKF_ATT_V2_R1, 0.8f);
|
PARAM_DEFINE_FLOAT(EKF_ATT_V3_R1, 10000.0f);
|
||||||
PARAM_DEFINE_FLOAT(EKF_ATT_V2_R2, 1.0f);
|
PARAM_DEFINE_FLOAT(EKF_ATT_V3_R2, 1.0f);
|
||||||
/* accelerometer measurement noise */
|
/* accelerometer measurement noise */
|
||||||
PARAM_DEFINE_FLOAT(EKF_ATT_V2_R3, 0.0f);
|
PARAM_DEFINE_FLOAT(EKF_ATT_V3_R3, 0.0f);
|
||||||
|
|
||||||
/* offsets in roll, pitch and yaw of sensor plane and body */
|
/* offsets in roll, pitch and yaw of sensor plane and body */
|
||||||
PARAM_DEFINE_FLOAT(ATT_ROLL_OFFS, 0.0f);
|
PARAM_DEFINE_FLOAT(ATT_ROLL_OFF3, 0.0f);
|
||||||
PARAM_DEFINE_FLOAT(ATT_PITCH_OFFS, 0.0f);
|
PARAM_DEFINE_FLOAT(ATT_PITCH_OFF3, 0.0f);
|
||||||
PARAM_DEFINE_FLOAT(ATT_YAW_OFFS, 0.0f);
|
PARAM_DEFINE_FLOAT(ATT_YAW_OFF3, 0.0f);
|
||||||
|
|
||||||
int parameters_init(struct attitude_estimator_ekf_param_handles *h)
|
int parameters_init(struct attitude_estimator_ekf_param_handles *h)
|
||||||
{
|
{
|
||||||
/* PID parameters */
|
/* PID parameters */
|
||||||
h->q0 = param_find("EKF_ATT_V2_Q0");
|
h->q0 = param_find("EKF_ATT_V3_Q0");
|
||||||
h->q1 = param_find("EKF_ATT_V2_Q1");
|
h->q1 = param_find("EKF_ATT_V3_Q1");
|
||||||
h->q2 = param_find("EKF_ATT_V2_Q2");
|
h->q2 = param_find("EKF_ATT_V3_Q2");
|
||||||
h->q3 = param_find("EKF_ATT_V2_Q3");
|
h->q3 = param_find("EKF_ATT_V3_Q3");
|
||||||
h->q4 = param_find("EKF_ATT_V2_Q4");
|
h->q4 = param_find("EKF_ATT_V3_Q4");
|
||||||
|
|
||||||
h->r0 = param_find("EKF_ATT_V2_R0");
|
h->r0 = param_find("EKF_ATT_V3_R0");
|
||||||
h->r1 = param_find("EKF_ATT_V2_R1");
|
h->r1 = param_find("EKF_ATT_V3_R1");
|
||||||
h->r2 = param_find("EKF_ATT_V2_R2");
|
h->r2 = param_find("EKF_ATT_V3_R2");
|
||||||
h->r3 = param_find("EKF_ATT_V2_R3");
|
h->r3 = param_find("EKF_ATT_V3_R3");
|
||||||
|
|
||||||
h->roll_off = param_find("ATT_ROLL_OFFS");
|
h->roll_off = param_find("ATT_ROLL_OFF3");
|
||||||
h->pitch_off = param_find("ATT_PITCH_OFFS");
|
h->pitch_off = param_find("ATT_PITCH_OFF3");
|
||||||
h->yaw_off = param_find("ATT_YAW_OFFS");
|
h->yaw_off = param_find("ATT_YAW_OFF3");
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue