mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 18:27:05 +08:00
delay time: potentially reduce delay time if baro/aux velocity/airspeed is not used
This commit is contained in:
committed by
Paul Riseborough
parent
611ace0ed6
commit
9c0a52d52a
@@ -277,6 +277,7 @@ struct parameters {
|
|||||||
// airspeed fusion
|
// airspeed fusion
|
||||||
float tas_innov_gate{5.0f}; ///< True Airspeed innovation consistency gate size (STD)
|
float tas_innov_gate{5.0f}; ///< True Airspeed innovation consistency gate size (STD)
|
||||||
float eas_noise{1.4f}; ///< EAS measurement noise standard deviation used for airspeed fusion (m/s)
|
float eas_noise{1.4f}; ///< EAS measurement noise standard deviation used for airspeed fusion (m/s)
|
||||||
|
float arsp_thr{0.0f}; ///< Airspeed fusion threshold. A value of zero will deactivate airspeed fusion
|
||||||
|
|
||||||
// synthetic sideslip fusion
|
// synthetic sideslip fusion
|
||||||
float beta_innov_gate{5.0f}; ///< synthetic sideslip innovation consistency gate size in standard deviation (STD)
|
float beta_innov_gate{5.0f}; ///< synthetic sideslip innovation consistency gate size in standard deviation (STD)
|
||||||
|
|||||||
@@ -478,9 +478,14 @@ void EstimatorInterface::setDragData(const imuSample &imu)
|
|||||||
bool EstimatorInterface::initialise_interface(uint64_t timestamp)
|
bool EstimatorInterface::initialise_interface(uint64_t timestamp)
|
||||||
{
|
{
|
||||||
// find the maximum time delay the buffers are required to handle
|
// find the maximum time delay the buffers are required to handle
|
||||||
float max_time_delay_ms = math::max(_params.baro_delay_ms,
|
// it's reasonable to assume that barometer is always used, and its delay is low
|
||||||
math::max(_params.auxvel_delay_ms,
|
// it's reasonable to assume that aux velocity device has low delay. TODO: check the delay only if the aux device is used
|
||||||
_params.airspeed_delay_ms));
|
float max_time_delay_ms = math::max(_params.baro_delay_ms, _params.auxvel_delay_ms);
|
||||||
|
|
||||||
|
// using airspeed
|
||||||
|
if (_params.arsp_thr > FLT_EPSILON) {
|
||||||
|
max_time_delay_ms = math::max(_params.airspeed_delay_ms, max_time_delay_ms);
|
||||||
|
}
|
||||||
|
|
||||||
// mag mode
|
// mag mode
|
||||||
if (_params.mag_fusion_type != MAG_FUSE_TYPE_NONE) {
|
if (_params.mag_fusion_type != MAG_FUSE_TYPE_NONE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user