From b0cf45e2d2436bde0bdae802b0597bb581a4b124 Mon Sep 17 00:00:00 2001 From: bresch Date: Thu, 10 Dec 2020 12:33:52 +0100 Subject: [PATCH] gps_alt: rename getGpsAltVar -> getGpsHeightVariance --- EKF/control.cpp | 2 +- EKF/covariance.cpp | 2 +- EKF/ekf.h | 2 +- EKF/ekf_helper.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/EKF/control.cpp b/EKF/control.cpp index 8d9b00b7bd..ed76c909e2 100644 --- a/EKF/control.cpp +++ b/EKF/control.cpp @@ -1103,7 +1103,7 @@ void Ekf::controlHeightFusion() Vector3f gps_hgt_obs_var; // vertical position innovation - gps measurement has opposite sign to earth z axis _gps_pos_innov(2) = _state.pos(2) + _gps_sample_delayed.hgt - _gps_alt_ref - _hgt_sensor_offset; - gps_hgt_obs_var(2) = getGpsAltVar(); + gps_hgt_obs_var(2) = getGpsHeightVariance(); // innovation gate size gps_hgt_innov_gate(1) = fmaxf(_params.baro_innov_gate, 1.0f); // fuse height information diff --git a/EKF/covariance.cpp b/EKF/covariance.cpp index 25238345c5..c493b46bb4 100644 --- a/EKF/covariance.cpp +++ b/EKF/covariance.cpp @@ -74,7 +74,7 @@ void Ekf::initialiseCovariance() P(9,9) = sq(fmaxf(_params.range_noise, 0.01f)); } else if (_control_status.flags.gps_hgt) { - P(9,9) = getGpsAltVar(); + P(9,9) = getGpsHeightVariance(); } else { P(9,9) = sq(fmaxf(_params.baro_noise, 0.01f)); diff --git a/EKF/ekf.h b/EKF/ekf.h index cc2866025a..eecf719090 100644 --- a/EKF/ekf.h +++ b/EKF/ekf.h @@ -852,7 +852,7 @@ private: void updateBaroHgtOffset(); // return an estimation of the GPS altitude variance - float getGpsAltVar(); + float getGpsHeightVariance(); // calculate the measurement variance for the optical flow sensor float calcOptFlowMeasVar(); diff --git a/EKF/ekf_helper.cpp b/EKF/ekf_helper.cpp index 30ef13635f..4234cb1d52 100644 --- a/EKF/ekf_helper.cpp +++ b/EKF/ekf_helper.cpp @@ -1244,7 +1244,7 @@ void Ekf::updateBaroHgtOffset() } } -float Ekf::getGpsAltVar() +float Ekf::getGpsHeightVariance() { // observation variance - receiver defined and parameter limited const float lower_limit = fmaxf(_params.gps_pos_noise, 0.01f);