|
|
|
@ -602,7 +602,7 @@ void NavEKF3_core::FuseMagnetometer()
@@ -602,7 +602,7 @@ void NavEKF3_core::FuseMagnetometer()
|
|
|
|
|
|
|
|
|
|
if (!inhibitDelVelBiasStates) { |
|
|
|
|
for (uint8_t index = 0; index < 3; index++) { |
|
|
|
|
uint8_t stateIndex = index + 13; |
|
|
|
|
const uint8_t stateIndex = index + 13; |
|
|
|
|
if (!dvelBiasAxisInhibit[index]) { |
|
|
|
|
Kfusion[stateIndex] = SK_MX[0]*(P[stateIndex][19] + P[stateIndex][1]*SH_MAG[0] - P[stateIndex][2]*SH_MAG[1] + P[stateIndex][3]*SH_MAG[2] + P[stateIndex][0]*SK_MX[2] - P[stateIndex][16]*SK_MX[1] + P[stateIndex][17]*SK_MX[4] - P[stateIndex][18]*SK_MX[3]); |
|
|
|
|
} else { |
|
|
|
@ -682,7 +682,7 @@ void NavEKF3_core::FuseMagnetometer()
@@ -682,7 +682,7 @@ void NavEKF3_core::FuseMagnetometer()
|
|
|
|
|
|
|
|
|
|
if (!inhibitDelVelBiasStates) { |
|
|
|
|
for (uint8_t index = 0; index < 3; index++) { |
|
|
|
|
uint8_t stateIndex = index + 13; |
|
|
|
|
const uint8_t stateIndex = index + 13; |
|
|
|
|
if (!dvelBiasAxisInhibit[index]) { |
|
|
|
|
Kfusion[stateIndex] = SK_MY[0]*(P[stateIndex][20] + P[stateIndex][0]*SH_MAG[2] + P[stateIndex][1]*SH_MAG[1] + P[stateIndex][2]*SH_MAG[0] - P[stateIndex][3]*SK_MY[2] - P[stateIndex][17]*SK_MY[1] - P[stateIndex][16]*SK_MY[3] + P[stateIndex][18]*SK_MY[4]); |
|
|
|
|
} else { |
|
|
|
@ -764,7 +764,7 @@ void NavEKF3_core::FuseMagnetometer()
@@ -764,7 +764,7 @@ void NavEKF3_core::FuseMagnetometer()
|
|
|
|
|
|
|
|
|
|
if (!inhibitDelVelBiasStates) { |
|
|
|
|
for (uint8_t index = 0; index < 3; index++) { |
|
|
|
|
uint8_t stateIndex = index + 13; |
|
|
|
|
const uint8_t stateIndex = index + 13; |
|
|
|
|
if (!dvelBiasAxisInhibit[index]) { |
|
|
|
|
Kfusion[stateIndex] = SK_MZ[0]*(P[stateIndex][21] + P[stateIndex][0]*SH_MAG[1] - P[stateIndex][1]*SH_MAG[2] + P[stateIndex][3]*SH_MAG[0] + P[stateIndex][2]*SK_MZ[2] + P[stateIndex][18]*SK_MZ[1] + P[stateIndex][16]*SK_MZ[4] - P[stateIndex][17]*SK_MZ[3]); |
|
|
|
|
} else { |
|
|
|
@ -1302,7 +1302,7 @@ void NavEKF3_core::FuseDeclination(float declErr)
@@ -1302,7 +1302,7 @@ void NavEKF3_core::FuseDeclination(float declErr)
|
|
|
|
|
|
|
|
|
|
if (!inhibitDelVelBiasStates) { |
|
|
|
|
for (uint8_t index = 0; index < 3; index++) { |
|
|
|
|
uint8_t stateIndex = index + 13; |
|
|
|
|
const uint8_t stateIndex = index + 13; |
|
|
|
|
if (!dvelBiasAxisInhibit[index]) { |
|
|
|
|
Kfusion[stateIndex] = -t4*t13*(P[stateIndex][16]*magE-P[stateIndex][17]*magN); |
|
|
|
|
} else { |
|
|
|
|