mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
position_estimator_inav: if flow is inaccurate, but used for correction with less weight
This commit is contained in:
parent
2fc011d20c
commit
b7d8d77c0f
@ -497,6 +497,10 @@ int position_estimator_inav_thread_main(int argc, char *argv[])
|
||||
/* adjust correction weight */
|
||||
float flow_q_weight = (flow_q - params.flow_q_min) / (1.0f - params.flow_q_min);
|
||||
flow_w = att.R[2][2] * flow_q_weight;
|
||||
/* if flow is not accurate, lower weight for it */
|
||||
// TODO make this more fuzzy
|
||||
if (!flow_accurate)
|
||||
flow_w *= 0.2f;
|
||||
flow_valid = true;
|
||||
flow_valid_time = t;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user