Copter: Access EKF variance checks through AHRS object

Supports flight using EKF2
This commit is contained in:
Paul Riseborough 2015-10-17 16:57:12 +11:00 committed by Andrew Tridgell
parent 0722ebe8a0
commit 7c6b31b585
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ bool Copter::ekf_over_threshold()
Vector2f offset;
float compass_variance;
float vel_variance;
ahrs.get_NavEKF().getVariances(vel_variance, posVar, hgtVar, magVar, tasVar, offset);
ahrs.get_variances(vel_variance, posVar, hgtVar, magVar, tasVar, offset);
compass_variance = magVar.length();
// return true if compass and velocity variance over the threshold

View File

@ -644,7 +644,7 @@ bool Copter::pre_arm_gps_checks(bool display_failure)
float vel_variance, pos_variance, hgt_variance, tas_variance;
Vector3f mag_variance;
Vector2f offset;
ahrs.get_NavEKF().getVariances(vel_variance, pos_variance, hgt_variance, mag_variance, tas_variance, offset);
ahrs.get_variances(vel_variance, pos_variance, hgt_variance, mag_variance, tas_variance, offset);
if (mag_variance.length() >= g.fs_ekf_thresh) {
if (display_failure) {
gcs_send_text_P(MAV_SEVERITY_CRITICAL,PSTR("PreArm: EKF compass variance"));