mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 08:07:35 +08:00
ekf2: rename resetAltitudeTo to initialiseAltitudeTo
This is to better show that the altitude is also used to set the origin.
This commit is contained in:
committed by
Mathieu Bresciani
parent
30d98885b7
commit
aeb182a8ed
@@ -163,7 +163,7 @@ void Ekf::controlBaroHeightFusion(const imuSample &imu_sample)
|
||||
_height_sensor_ref = HeightSensor::BARO;
|
||||
|
||||
_information_events.flags.reset_hgt_to_baro = true;
|
||||
resetAltitudeTo(measurement, measurement_var);
|
||||
initialiseAltitudeTo(measurement, measurement_var);
|
||||
bias_est.reset();
|
||||
|
||||
} else {
|
||||
|
||||
@@ -129,7 +129,7 @@ void Ekf::controlGnssHeightFusion(const gnssSample &gps_sample)
|
||||
|
||||
_information_events.flags.reset_hgt_to_gps = true;
|
||||
|
||||
resetAltitudeTo(measurement, measurement_var);
|
||||
initialiseAltitudeTo(measurement, measurement_var);
|
||||
bias_est.reset();
|
||||
|
||||
} else {
|
||||
|
||||
@@ -296,7 +296,7 @@ bool Ekf::resetGlobalPosToExternalObservation(const double latitude, const doubl
|
||||
return false;
|
||||
}
|
||||
|
||||
resetAltitudeTo(altitude, sq(epv));
|
||||
initialiseAltitudeTo(altitude, sq(epv));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -370,7 +370,7 @@ bool Ekf::resetGlobalPosToExternalObservation(const double latitude, const doubl
|
||||
const float obs_var = math::max(sq(epv), sq(0.01f));
|
||||
|
||||
ECL_INFO("reset height to external observation");
|
||||
resetAltitudeTo(gpos_corrected.altitude(), obs_var);
|
||||
initialiseAltitudeTo(gpos_corrected.altitude(), obs_var);
|
||||
_last_known_gpos.setAltitude(gpos_corrected.altitude());
|
||||
}
|
||||
|
||||
|
||||
@@ -649,7 +649,7 @@ private:
|
||||
bool setAltOrigin(float altitude, float vpos_var = NAN);
|
||||
|
||||
bool resetLatLonTo(double latitude, double longitude, float hpos_var = NAN);
|
||||
bool resetAltitudeTo(float altitude, float vpos_var = NAN);
|
||||
bool initialiseAltitudeTo(float altitude, float vpos_var = NAN);
|
||||
|
||||
// update quaternion states and covariances using an innovation, observation variance and Jacobian vector
|
||||
bool fuseYaw(estimator_aid_source1d_s &aid_src_status, const VectorState &H_YAW);
|
||||
|
||||
@@ -160,7 +160,7 @@ bool Ekf::resetGlobalPositionTo(const double latitude, const double longitude, c
|
||||
}
|
||||
|
||||
// altitude is optional
|
||||
resetAltitudeTo(altitude, vpos_var);
|
||||
initialiseAltitudeTo(altitude, vpos_var);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -216,7 +216,7 @@ bool Ekf::resetLatLonTo(const double latitude, const double longitude, const flo
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Ekf::resetAltitudeTo(const float altitude, const float vpos_var)
|
||||
bool Ekf::initialiseAltitudeTo(const float altitude, const float vpos_var)
|
||||
{
|
||||
if (!checkAltitudeValidity(altitude)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user