mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 00:01:37 +08:00
ekf2: correctly compute vel variance from flow variance
Co-authored-by: Marco Hauswirth <marco.hauswirth@auterion.com>
This commit is contained in:
committed by
Daniel Agar
co-authored by
Marco Hauswirth
parent
1a4e8a7341
commit
9183c479a5
@@ -217,7 +217,9 @@ void Ekf::resetFlowFusion()
|
|||||||
{
|
{
|
||||||
ECL_INFO("reset velocity to flow");
|
ECL_INFO("reset velocity to flow");
|
||||||
_information_events.flags.reset_vel_to_flow = true;
|
_information_events.flags.reset_vel_to_flow = true;
|
||||||
resetHorizontalVelocityTo(_flow_vel_ne, calcOptFlowMeasVar(_flow_sample_delayed));
|
|
||||||
|
const float flow_vel_var = sq(predictFlowRange()) * calcOptFlowMeasVar(_flow_sample_delayed);
|
||||||
|
resetHorizontalVelocityTo(_flow_vel_ne, flow_vel_var);
|
||||||
|
|
||||||
// reset position, estimate is relative to initial position in this mode, so we start with zero error
|
// reset position, estimate is relative to initial position in this mode, so we start with zero error
|
||||||
if (!_control_status.flags.in_air) {
|
if (!_control_status.flags.in_air) {
|
||||||
|
|||||||
Reference in New Issue
Block a user