From 29534a7e2d337338d7372feb5ec5bf6f9483240a Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Wed, 14 Apr 2021 23:21:50 +0100 Subject: [PATCH] AP_Windvane: set true to apparent if no speed sensor --- libraries/AP_WindVane/AP_WindVane.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_WindVane/AP_WindVane.cpp b/libraries/AP_WindVane/AP_WindVane.cpp index c31b58b06f..92be1cffb0 100644 --- a/libraries/AP_WindVane/AP_WindVane.cpp +++ b/libraries/AP_WindVane/AP_WindVane.cpp @@ -295,6 +295,10 @@ void AP_WindVane::update() // assume true wind has not changed, calculate the apparent wind direction and speed update_apparent_wind_dir_from_true(); } + } else { + // only have direction, cant to true wind calcs, set true direction to apparent + _direction_true = _direction_apparent_raw + AP::ahrs().yaw; + _speed_true = 0.0f; } /*