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-08-15 16:41:38 +02:00
parent 5c5bf0b83d
commit d2e4d85bce
37 changed files with 216 additions and 27 deletions
@@ -1953,17 +1953,12 @@ FixedWingModeManager::Run()
perf_begin(_loop_perf);
if (_vehicle_status_sub.updated()) {
if (_vehicle_status_sub.update(&_vehicle_status)) {
_nav_state = _vehicle_status.nav_state;
}
}
_vehicle_status_sub.update(&_vehicle_status);
/* only run controller if position changed and we are not running an external mode*/
const bool is_external_nav_state = (_nav_state >= vehicle_status_s::NAVIGATION_STATE_EXTERNAL1)
&& (_nav_state <= vehicle_status_s::NAVIGATION_STATE_EXTERNAL8);
const bool is_external_nav_state = (_vehicle_status.nav_state >= vehicle_status_s::NAVIGATION_STATE_EXTERNAL1)
&& (_vehicle_status.nav_state <= vehicle_status_s::NAVIGATION_STATE_EXTERNAL8);
if (is_external_nav_state) {
// this will cause the configuration handler to publish immediately the next time an internal flight