mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
Increase matrix library usage even more
This commit is contained in:
parent
630be60930
commit
4a69b41015
@ -215,7 +215,7 @@ void Ekf::fuseAirspeed()
|
||||
// only apply covariance and state corrections if healthy
|
||||
if (healthy) {
|
||||
// apply the covariance corrections
|
||||
P = P - KHP;
|
||||
P -= KHP;
|
||||
|
||||
// correct the covariance matrix for gross errors
|
||||
fixCovarianceErrors(true);
|
||||
|
||||
@ -292,11 +292,8 @@ void Ekf::fuseDrag()
|
||||
// only apply covariance and state corrections if healthy
|
||||
if (healthy) {
|
||||
// apply the covariance corrections
|
||||
for (unsigned row = 0; row < _k_num_states; row++) {
|
||||
for (unsigned column = 0; column < _k_num_states; column++) {
|
||||
P(row,column) = P(row,column) - KHP(row,column);
|
||||
}
|
||||
}
|
||||
P -= KHP;
|
||||
|
||||
|
||||
// correct the covariance matrix for gross errors
|
||||
fixCovarianceErrors(true);
|
||||
|
||||
@ -261,11 +261,7 @@ void Ekf::fuseGpsAntYaw()
|
||||
if (healthy) {
|
||||
_time_last_gps_yaw_fuse = _time_last_imu;
|
||||
// apply the covariance corrections
|
||||
for (unsigned row = 0; row < _k_num_states; row++) {
|
||||
for (unsigned column = 0; column < _k_num_states; column++) {
|
||||
P(row,column) = P(row,column) - KHP(row,column);
|
||||
}
|
||||
}
|
||||
P -= KHP;
|
||||
|
||||
// correct the covariance matrix for gross errors
|
||||
fixCovarianceErrors(true);
|
||||
|
||||
@ -416,11 +416,7 @@ void Ekf::fuseMag()
|
||||
// only apply covariance and state corrections if healthy
|
||||
if (healthy) {
|
||||
// apply the covariance corrections
|
||||
for (unsigned row = 0; row < _k_num_states; row++) {
|
||||
for (unsigned column = 0; column < _k_num_states; column++) {
|
||||
P(row,column) = P(row,column) - KHP(row,column);
|
||||
}
|
||||
}
|
||||
P -= KHP;
|
||||
|
||||
// correct the covariance matrix for gross errors
|
||||
fixCovarianceErrors(true);
|
||||
@ -752,11 +748,7 @@ void Ekf::updateQuaternion(const float innovation, const float variance, const f
|
||||
// only apply covariance and state corrections if healthy
|
||||
if (healthy) {
|
||||
// apply the covariance corrections
|
||||
for (unsigned row = 0; row < _k_num_states; row++) {
|
||||
for (unsigned column = 0; column < _k_num_states; column++) {
|
||||
P(row,column) = P(row,column) - KHP(row,column);
|
||||
}
|
||||
}
|
||||
P -= KHP;
|
||||
|
||||
// correct the covariance matrix for gross errors
|
||||
fixCovarianceErrors(true);
|
||||
@ -1045,11 +1037,7 @@ void Ekf::fuseDeclination(float decl_sigma)
|
||||
// only apply covariance and state corrections if healthy
|
||||
if (healthy) {
|
||||
// apply the covariance corrections
|
||||
for (unsigned row = 0; row < _k_num_states; row++) {
|
||||
for (unsigned column = 0; column < _k_num_states; column++) {
|
||||
P(row,column) = P(row,column) - KHP(row,column);
|
||||
}
|
||||
}
|
||||
P -= KHP;
|
||||
|
||||
// correct the covariance matrix for gross errors
|
||||
fixCovarianceErrors(true);
|
||||
|
||||
@ -494,11 +494,7 @@ void Ekf::fuseOptFlow()
|
||||
// only apply covariance and state corrections if healthy
|
||||
if (healthy) {
|
||||
// apply the covariance corrections
|
||||
for (unsigned row = 0; row < _k_num_states; row++) {
|
||||
for (unsigned column = 0; column < _k_num_states; column++) {
|
||||
P(row,column) = P(row,column) - KHP(row,column);
|
||||
}
|
||||
}
|
||||
P -= KHP;
|
||||
|
||||
// correct the covariance matrix for gross errors
|
||||
fixCovarianceErrors(true);
|
||||
|
||||
@ -263,11 +263,7 @@ void Ekf::fuseSideslip()
|
||||
// only apply covariance and state corrections if healthy
|
||||
if (healthy) {
|
||||
// apply the covariance corrections
|
||||
for (unsigned row = 0; row < _k_num_states; row++) {
|
||||
for (unsigned column = 0; column < _k_num_states; column++) {
|
||||
P(row,column) = P(row,column) - KHP(row,column);
|
||||
}
|
||||
}
|
||||
P -= KHP;
|
||||
|
||||
// correct the covariance matrix for gross errors
|
||||
fixCovarianceErrors(true);
|
||||
|
||||
@ -190,11 +190,7 @@ void Ekf::fuseVelPosHeight(const float innov, const float innov_var, const int o
|
||||
// only apply covariance and state corrections if healthy
|
||||
if (healthy) {
|
||||
// apply the covariance corrections
|
||||
for (unsigned row = 0; row < _k_num_states; row++) {
|
||||
for (unsigned column = 0; column < _k_num_states; column++) {
|
||||
P(row, column) = P(row, column) - KHP(row, column);
|
||||
}
|
||||
}
|
||||
P -= KHP;
|
||||
|
||||
// correct the covariance matrix for gross errors
|
||||
fixCovarianceErrors(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user