Add Altitude Cruise mode

-add new NAVIGATION_STATE_ALTITUDE_VOYAGER
-this mode does require manual control to enter
-but you can disable the manual control loss failsafe to continue
flying in case of manual control loss
-for MC: in throttle and yaw are controlled like in Altitude mode,
the tilt is controlled via integrated rate input (similar to Acro,
but with tilt limit)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2025-09-18 15:50:10 +02:00
parent 5c5bf0b83d
commit d2e4d85bce
37 changed files with 216 additions and 27 deletions
@@ -249,6 +249,17 @@ void FlightModeManager::start_flight_task()
matching_task_running = matching_task_running && !task_failure;
}
// Altitude cruise
if (_vehicle_status_sub.get().nav_state == vehicle_status_s::NAVIGATION_STATE_ALTITUDE_CRUISE) {
found_some_task = true;
FlightTaskError error = FlightTaskError::NoError;
error = switchTask(FlightTaskIndex::AltitudeCruise);
task_failure = (error != FlightTaskError::NoError);
matching_task_running = matching_task_running && !task_failure;
}
// Emergency descend
if (nav_state_descend || task_failure) {
found_some_task = true;