uint8_tquality;// quality indicator between 0 and 255
uint8_tquality;// quality indicator between 0 and 255
Vector2fflowRadXY;// measured delta angle of the image about the X and Y body axes (rad), RH rotaton is positive
Vector2fflowRadXY;// measured delta angle of the image about the X and Y body axes (rad), RH rotaton is positive
Vector2fflowRadXYcomp;// measured delta angle of the image about the X and Y body axes after removal of body rotation (rad), RH rotation is positive
Vector2fflowRadXYcomp;// measured delta angle of the image about the X and Y body axes after removal of body rotation (rad), RH rotation is positive
Vector2fgyroXY;// measured delta angle of the inertial frame about the X and Y body axes obtained from rate gyro measurements (rad), RH rotation is positive
Vector3fgyroXYZ;// measured delta angle of the inertial frame about the body axes obtained from rate gyro measurements (rad), RH rotation is positive
floatdt;// amount of integration time (sec)
floatdt;// amount of integration time (sec)
uint64_ttime_us;// timestamp in microseconds of the integration period mid-point
uint64_ttime_us;// timestamp in microseconds of the integration period mid-point
};
};
@ -223,6 +223,12 @@ struct parameters {
floatreq_hdrift;// maximum acceptable horizontal drift speed
floatreq_hdrift;// maximum acceptable horizontal drift speed
floatreq_vdrift;// maximum acceptable vertical drift speed
floatreq_vdrift;// maximum acceptable vertical drift speed
// XYZ offset of sensors in body axes (m)
Vector3fimu_pos_body;// xyz position of IMU in body frame (m)
Vector3fgps_pos_body;// xyz position of the GPS antenna in body frame (m)
Vector3frng_pos_body;// xyz position of range sensor in body frame (m)
Vector3fflow_pos_body;// xyz position of range sensor focal point in body frame (m)
// Initialize parameter values. Initialization must be accomplished in the constructor to allow C99 compiler compatibility.
// Initialize parameter values. Initialization must be accomplished in the constructor to allow C99 compiler compatibility.
// NOTE: the EKF uses the reverse sign convention to the flow sensor. EKF assumes positive LOS rate is produced by a RH rotation of the image about the sensor axis.
// NOTE: the EKF uses the reverse sign convention to the flow sensor. EKF assumes positive LOS rate is produced by a RH rotation of the image about the sensor axis.
// copy the optical and gyro measured delta angles
// copy the optical and gyro measured delta angles
// predict the hagl from the vehicle position and terrain height
// predict the hagl from the vehicle position and terrain height
floatpred_hagl=_terrain_vpos-_state.pos(2);
floatpred_hagl=_terrain_vpos-_state.pos(2);
@ -99,7 +99,7 @@ void Ekf::fuseHagl()
_hagl_innov=pred_hagl-meas_hagl;
_hagl_innov=pred_hagl-meas_hagl;
// calculate the observation variance adding the variance of the vehicles own height uncertainty and factoring in the effect of tilt on measurement error
// calculate the observation variance adding the variance of the vehicles own height uncertainty and factoring in the effect of tilt on measurement error