|
|
|
@ -116,6 +116,7 @@ bool NavEKF3_core::setup_core(uint8_t _imu_index, uint8_t _core_index)
@@ -116,6 +116,7 @@ bool NavEKF3_core::setup_core(uint8_t _imu_index, uint8_t _core_index)
|
|
|
|
|
if(dal.opticalflow_enabled() && !storedOF.init(flow_buffer_length)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
#if EK3_FEATURE_BODY_ODOM |
|
|
|
|
if(frontend->sources.ext_nav_enabled() && !storedBodyOdm.init(obs_buffer_length)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
@ -123,6 +124,7 @@ bool NavEKF3_core::setup_core(uint8_t _imu_index, uint8_t _core_index)
@@ -123,6 +124,7 @@ bool NavEKF3_core::setup_core(uint8_t _imu_index, uint8_t _core_index)
|
|
|
|
|
// initialise to same length of IMU to allow for multiple wheel sensors
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
#endif // EK3_FEATURE_BODY_ODOM
|
|
|
|
|
if(frontend->sources.gps_yaw_enabled() && !storedYawAng.init(obs_buffer_length)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
@ -372,9 +374,11 @@ void NavEKF3_core::InitialiseVariables()
@@ -372,9 +374,11 @@ void NavEKF3_core::InitialiseVariables()
|
|
|
|
|
bcnPosOffsetNED.zero(); |
|
|
|
|
bcnOriginEstInit = false; |
|
|
|
|
|
|
|
|
|
#if EK3_FEATURE_BODY_ODOM |
|
|
|
|
// body frame displacement fusion
|
|
|
|
|
memset((void *)&bodyOdmDataNew, 0, sizeof(bodyOdmDataNew)); |
|
|
|
|
memset((void *)&bodyOdmDataDelayed, 0, sizeof(bodyOdmDataDelayed)); |
|
|
|
|
#endif |
|
|
|
|
lastbodyVelPassTime_ms = 0; |
|
|
|
|
memset(&bodyVelTestRatio, 0, sizeof(bodyVelTestRatio)); |
|
|
|
|
memset(&varInnovBodyVel, 0, sizeof(varInnovBodyVel)); |
|
|
|
@ -408,8 +412,10 @@ void NavEKF3_core::InitialiseVariables()
@@ -408,8 +412,10 @@ void NavEKF3_core::InitialiseVariables()
|
|
|
|
|
storedRange.reset(); |
|
|
|
|
storedOutput.reset(); |
|
|
|
|
storedRangeBeacon.reset(); |
|
|
|
|
#if EK3_FEATURE_BODY_ODOM |
|
|
|
|
storedBodyOdm.reset(); |
|
|
|
|
storedWheelOdm.reset(); |
|
|
|
|
#endif |
|
|
|
|
storedExtNav.reset(); |
|
|
|
|
storedExtNavVel.reset(); |
|
|
|
|
|
|
|
|
@ -672,8 +678,10 @@ void NavEKF3_core::UpdateFilter(bool predict)
@@ -672,8 +678,10 @@ void NavEKF3_core::UpdateFilter(bool predict)
|
|
|
|
|
// Update states using optical flow data
|
|
|
|
|
SelectFlowFusion(); |
|
|
|
|
|
|
|
|
|
#if EK3_FEATURE_BODY_ODOM |
|
|
|
|
// Update states using body frame odometry data
|
|
|
|
|
SelectBodyOdomFusion(); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// Update states using airspeed data
|
|
|
|
|
SelectTasFusion(); |
|
|
|
|