From 7ec6f0dca6ec604e5a62707e487ad754a23ded7a Mon Sep 17 00:00:00 2001 From: Oleg Kalachev <okalachev@gmail.com> Date: Sun, 5 May 2019 06:22:30 +0300 Subject: [PATCH] lpe: use minimum flow altitude from uORB instead of hardcoding --- src/modules/local_position_estimator/sensors/flow.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/modules/local_position_estimator/sensors/flow.cpp b/src/modules/local_position_estimator/sensors/flow.cpp index bde403358e..c6fd629605 100644 --- a/src/modules/local_position_estimator/sensors/flow.cpp +++ b/src/modules/local_position_estimator/sensors/flow.cpp @@ -10,9 +10,6 @@ extern orb_advert_t mavlink_log_pub; static const uint32_t REQ_FLOW_INIT_COUNT = 10; static const uint32_t FLOW_TIMEOUT = 1000000; // 1 s -// minimum flow altitude -static const float flow_min_agl = 0.3; - void BlockLocalPositionEstimator::flowInit() { // measure @@ -44,7 +41,7 @@ int BlockLocalPositionEstimator::flowMeasure(Vector<float, n_y_flow> &y) } // check for agl - if (agl() < flow_min_agl) { + if (agl() < _sub_flow.get().min_ground_distance) { return -1; } -- GitLab