From a6ef7b6da9ed2d03640c56855897b621524b16cd Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Mon, 12 Feb 2024 16:01:48 +0100 Subject: [PATCH] RTL: write out weather vane in comments (instead of WV) Signed-off-by: Silvan Fuhrer --- src/modules/navigator/rtl_direct.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/modules/navigator/rtl_direct.cpp b/src/modules/navigator/rtl_direct.cpp index 2eb7977fe8..275cf011e2 100644 --- a/src/modules/navigator/rtl_direct.cpp +++ b/src/modules/navigator/rtl_direct.cpp @@ -208,7 +208,7 @@ void RtlDirect::set_rtl_item() setLoiterHoldMissionItem(_mission_item, pos_yaw_sp, 0.f, _land_approach.loiter_radius_m); } else { - // already set final yaw if close to destination and WV is disabled + // already set final yaw if close to destination and weather vane is disabled pos_yaw_sp.yaw = (is_close_to_destination && !_param_wv_en.get()) ? _destination.yaw : NAN; setMoveToPositionMissionItem(_mission_item, pos_yaw_sp); } @@ -223,7 +223,7 @@ void RtlDirect::set_rtl_item() .lat = _land_approach.lat, .lon = _land_approach.lon, .alt = loiter_altitude, - .yaw = !_param_wv_en.get() ? _destination.yaw : NAN, // set final yaw if WV is disabled + .yaw = !_param_wv_en.get() ? _destination.yaw : NAN, // set final yaw if weather vane is disabled }; setLoiterToAltMissionItem(_mission_item, pos_yaw_sp, _land_approach.loiter_radius_m); @@ -250,10 +250,9 @@ void RtlDirect::set_rtl_item() .lat = _land_approach.lat, .lon = _land_approach.lon, .alt = loiter_altitude, - .yaw = !_param_wv_en.get() ? _destination.yaw : NAN, // set final yaw if WV is disabled + .yaw = !_param_wv_en.get() ? _destination.yaw : NAN, // set final yaw if weather vane is disabled }; - // set final yaw if WV is disabled setLoiterHoldMissionItem(_mission_item, pos_yaw_sp, _param_rtl_land_delay.get(), _land_approach.loiter_radius_m); if (_param_rtl_land_delay.get() < -FLT_EPSILON) { @@ -307,7 +306,7 @@ void RtlDirect::set_rtl_item() case RTLState::MOVE_TO_LAND_HOVER: { PositionYawSetpoint pos_yaw_sp{_destination}; pos_yaw_sp.alt = loiter_altitude; - pos_yaw_sp.yaw = !_param_wv_en.get() ? _destination.yaw : NAN; // set final yaw if WV is disabled + pos_yaw_sp.yaw = !_param_wv_en.get() ? _destination.yaw : NAN; // set final yaw if weather vane is disabled setMoveToPositionMissionItem(_mission_item, pos_yaw_sp); _navigator->reset_position_setpoint(pos_sp_triplet->previous); @@ -319,7 +318,7 @@ void RtlDirect::set_rtl_item() case RTLState::LAND: { PositionYawSetpoint pos_yaw_sp{_destination}; - pos_yaw_sp.yaw = !_param_wv_en.get() ? _destination.yaw : NAN; // set final yaw if WV is disabled + pos_yaw_sp.yaw = !_param_wv_en.get() ? _destination.yaw : NAN; // set final yaw if weather vane is disabled setLandMissionItem(_mission_item, pos_yaw_sp); _mission_item.land_precision = _param_rtl_pld_md.get();