RT: only chose mission RTL if mission is valid

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2024-04-11 13:47:17 +02:00
parent 5fab21d099
commit 926e7878af
2 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -617,7 +617,8 @@ void RTL::parameters_update()
bool RTL::hasMissionLandStart() const
{
return _mission_sub.get().land_start_index >= 0 && _mission_sub.get().land_index >= 0;
return _mission_sub.get().land_start_index >= 0 && _mission_sub.get().land_index >= 0
&& _navigator->get_mission_result()->valid;
}
bool RTL::hasVtolLandApproach(const PositionYawSetpoint &rtl_position) const