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
+1 -1
View File
@@ -41,7 +41,7 @@ set(POSCONTROL_DEPENDENCIES
SlewRate
tecs
motion_planning
performance_model
performance_model
Sticks
)
@@ -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
@@ -246,8 +246,6 @@ private:
// VEHICLE STATES
uint8_t _nav_state;
double _current_latitude{0};
double _current_longitude{0};
float _current_altitude{0.f};