mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 08:27:34 +08:00
Style improvement
This commit is contained in:
committed by
Mathieu Bresciani
parent
01515b9a9c
commit
5ef18f8823
+2
-2
@@ -324,7 +324,7 @@ void Ekf::calculateOutputStates()
|
||||
const float dt_scale_correction = _dt_imu_avg / _dt_ekf_avg;
|
||||
|
||||
// Apply corrections to the delta angle required to track the quaternion states at the EKF fusion time horizon
|
||||
const Vector3f delta_angle{imu.delta_ang - _state.delta_ang_bias * dt_scale_correction + _delta_angle_corr};
|
||||
const Vector3f delta_angle(imu.delta_ang - _state.delta_ang_bias * dt_scale_correction + _delta_angle_corr);
|
||||
|
||||
// calculate a yaw change about the earth frame vertical
|
||||
const float spin_del_ang_D = _R_to_earth_now(2, 0) * delta_angle(0) +
|
||||
@@ -363,7 +363,7 @@ void Ekf::calculateOutputStates()
|
||||
}
|
||||
|
||||
// save the previous velocity so we can use trapezoidal integration
|
||||
const Vector3f vel_last{_output_new.vel};
|
||||
const Vector3f vel_last(_output_new.vel);
|
||||
|
||||
// increment the INS velocity states by the measurement plus corrections
|
||||
// do the same for vertical state used by alternative correction algorithm
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ bool Ekf::gps_is_good(const gps_message &gps)
|
||||
_gps_check_fail_status.flags.sacc = (gps.sacc > _params.req_sacc);
|
||||
|
||||
// check if GPS quality is degraded
|
||||
_gps_error_norm = fmaxf((gps.eph / _params.req_hacc) , (gps.epv / _params.req_vacc));
|
||||
_gps_error_norm = fmaxf((gps.eph / _params.req_hacc), (gps.epv / _params.req_vacc));
|
||||
_gps_error_norm = fmaxf(_gps_error_norm , (gps.sacc / _params.req_sacc));
|
||||
|
||||
// Calculate time lapsed since last update, limit to prevent numerical errors and calculate a lowpass filter coefficient
|
||||
|
||||
Reference in New Issue
Block a user