mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-09 03:18:53 +08:00
gps_alt: rename getGpsAltVar -> getGpsHeightVariance
This commit is contained in:
+1
-1
@@ -1103,7 +1103,7 @@ void Ekf::controlHeightFusion()
|
|||||||
Vector3f gps_hgt_obs_var;
|
Vector3f gps_hgt_obs_var;
|
||||||
// vertical position innovation - gps measurement has opposite sign to earth z axis
|
// 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_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
|
// innovation gate size
|
||||||
gps_hgt_innov_gate(1) = fmaxf(_params.baro_innov_gate, 1.0f);
|
gps_hgt_innov_gate(1) = fmaxf(_params.baro_innov_gate, 1.0f);
|
||||||
// fuse height information
|
// fuse height information
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ void Ekf::initialiseCovariance()
|
|||||||
P(9,9) = sq(fmaxf(_params.range_noise, 0.01f));
|
P(9,9) = sq(fmaxf(_params.range_noise, 0.01f));
|
||||||
|
|
||||||
} else if (_control_status.flags.gps_hgt) {
|
} else if (_control_status.flags.gps_hgt) {
|
||||||
P(9,9) = getGpsAltVar();
|
P(9,9) = getGpsHeightVariance();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
P(9,9) = sq(fmaxf(_params.baro_noise, 0.01f));
|
P(9,9) = sq(fmaxf(_params.baro_noise, 0.01f));
|
||||||
|
|||||||
@@ -852,7 +852,7 @@ private:
|
|||||||
void updateBaroHgtOffset();
|
void updateBaroHgtOffset();
|
||||||
|
|
||||||
// return an estimation of the GPS altitude variance
|
// return an estimation of the GPS altitude variance
|
||||||
float getGpsAltVar();
|
float getGpsHeightVariance();
|
||||||
|
|
||||||
// calculate the measurement variance for the optical flow sensor
|
// calculate the measurement variance for the optical flow sensor
|
||||||
float calcOptFlowMeasVar();
|
float calcOptFlowMeasVar();
|
||||||
|
|||||||
+1
-1
@@ -1244,7 +1244,7 @@ void Ekf::updateBaroHgtOffset()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float Ekf::getGpsAltVar()
|
float Ekf::getGpsHeightVariance()
|
||||||
{
|
{
|
||||||
// observation variance - receiver defined and parameter limited
|
// observation variance - receiver defined and parameter limited
|
||||||
const float lower_limit = fmaxf(_params.gps_pos_noise, 0.01f);
|
const float lower_limit = fmaxf(_params.gps_pos_noise, 0.01f);
|
||||||
|
|||||||
Reference in New Issue
Block a user