From 81a64c04790375b422a52b4f7274261b45d0afe2 Mon Sep 17 00:00:00 2001 From: ChristophTobler Date: Tue, 10 Oct 2017 14:39:44 +0200 Subject: [PATCH] ekf: fix flow direction when on ground --- EKF/estimator_interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EKF/estimator_interface.cpp b/EKF/estimator_interface.cpp index 4cf801a2f6..a0ec16e692 100644 --- a/EKF/estimator_interface.cpp +++ b/EKF/estimator_interface.cpp @@ -307,8 +307,8 @@ void EstimatorInterface::setOpticalFlowData(uint64_t time_usec, flow_message *fl } else { // when on the ground with poor flow quality, assume zero ground relative velocity - optflow_sample_new.flowRadXY(0) = + flow->gyrodata(0); - optflow_sample_new.flowRadXY(1) = + flow->gyrodata(1); + optflow_sample_new.flowRadXY(0) = - flow->gyrodata(0); + optflow_sample_new.flowRadXY(1) = - flow->gyrodata(1); }