Skip to content

navigation: add MSP precision landing target consumer for MC/VTOL - #11554

Draft
mart1npetroff wants to merge 68 commits into
iNavFlight:maintenance-10.xfrom
mart1npetroff:msp2-inav-set-precision-landing-and-posh-target
Draft

navigation: add MSP precision landing target consumer for MC/VTOL#11554
mart1npetroff wants to merge 68 commits into
iNavFlight:maintenance-10.xfrom
mart1npetroff:msp2-inav-set-precision-landing-and-posh-target

Conversation

@mart1npetroff

Copy link
Copy Markdown

Implement an INAV-side precision-landing target consumer that accepts external target offsets over MSP and applies correction only in MC/VTOL POSHOLD/LAND contexts, without direct motor/attitude control and without mode switching.

  • add MSP2_INAV_SET_PRECISION_LANDING_TARGET (0x2231 / 8753)
  • add precision landing state machine module (cache/validate/use/fallback)
  • integrate with NAV + multicopter position controller + LAND flow
  • add nav status exposure for precision states (OSD/DJI mappings)
  • add CLI settings for source/validation/correction/retry behavior
  • keep descent profile on standard LAND logic (remove custom PL descent tuning)
  • add retry timeout auto mode: nav_precision_landing_retry_timeout_ms=0 => 2 * lost_hold_time_ms
  • document MSP payload/reply and navigation behavior in docs

Safety behavior:

  • no activation in fixed-wing profile
  • no correction use in failsafe
  • stale/low-confidence/bad-frame targets are rejected
  • target loss recovery: HOLD -> CLIMB_AND_RETRY -> NORMAL_LAND fallback

…speed-first logic and dynamic scaling

- Introduce a common VTOL transition controller path used by:
  - manual MIXER TRANSITION (edge-triggered mode, optional via manual_vtol_transition_controller)
  - mission-authorized VTOL transition via nav_vtol_mission_transition_user_action
- Keep profile hot-switch safety boundaries intact:
  - no broad manual mixer switching in active waypoint navigation
  - switching remains authorized only through transition state handling
- Add airspeed-first completion behavior:
  - MC->FW threshold via vtol_transition_to_fw_min_airspeed_cm_s
  - FW->MC threshold via vtol_transition_to_mc_max_airspeed_cm_s
  - timer fallback only when pitot is unavailable/unhealthy
  - timeout/abort support via vtol_transition_airspeed_timeout_ms
- Add optional dynamic mixer scaling (vtol_transition_dynamic_mixer):
  - pusher contribution ramping
  - lift throttle scaling (vtol_transition_lift_end_percent)
  - MC authority scaling (vtol_transition_mc_authority_end_percent)
  - FW authority blend scaling (vtol_transition_fw_authority_start_percent)
- Fix transition scaling/progress details:
  - pusher ramp uses idle-to-target interpolation
  - FW->MC progress uses captured transition start airspeed for smooth deceleration-based ramp
- Improve transition abort/reset robustness:
  - clear transition/nav mission transition state on disarm/failsafe/abort paths
  - avoid blind mission resume after half-complete transition
- Add mission VTOL settings and behavior:
  - nav_vtol_mission_transition_user_action
  - nav_vtol_mission_transition_min_altitude_cm
  - nav_vtol_mission_transition_track_distance_cm
  - mission pause/resume around transition, straight-line MC->FW transition segment
- Update documentation:
  - MixerProfile.md, Navigation.md, VTOL.md
  - document unified controller, manual semantics, mission semantics, airspeed precedence, dynamic scaling, and CLI usage
…orm target (0=MC, 1=FW)

- document dependency on existing mixer profile switching infrastructure (two profiles + MIXER PROFILE 2 mode condition)
- update docs: MixerProfile.md, Navigation.md, VTOL.md with behavior, safety boundaries, tuning examples, and CLI reference
…y/3-pos switch behavior

- add new mixer setting `vtol_transition_scale_ramp_time_ms` (default 0)
- keep backward compatibility:
  - `0` => scaling stays coupled to transition progress (existing behavior)
  - `>0` => pusher/lift/authority scaling uses time-based ramp
- keep transition completion logic unchanged:
  - airspeed-first when pitot is healthy/available
  - timer fallback via `mixer_switch_trans_timer` when pitot is unavailable/unhealthy
- wire new setting into mixer profile config/reset path
- update VTOL and MixerProfile docs:
  - explicitly state intent is not to replace legacy manual behavior
  - document 3-position workflow with edge-trigger controller
  - document new ramp timer semantics with practical examples
Implement an INAV-side precision-landing target consumer that accepts external
target offsets over MSP and applies correction only in MC/VTOL POSHOLD/LAND
contexts, without direct motor/attitude control and without mode switching.

- add MSP2_INAV_SET_PRECISION_LANDING_TARGET (0x2231 / 8753)
- add precision landing state machine module (cache/validate/use/fallback)
- integrate with NAV + multicopter position controller + LAND flow
- add nav status exposure for precision states (OSD/DJI mappings)
- add CLI settings for source/validation/correction/retry behavior
- keep descent profile on standard LAND logic (remove custom PL descent tuning)
- add retry timeout auto mode:
  nav_precision_landing_retry_timeout_ms=0 => 2 * lost_hold_time_ms
- document MSP payload/reply and navigation behavior in docs

Safety behavior:
- no activation in fixed-wing profile
- no correction use in failsafe
- stale/low-confidence/bad-frame targets are rejected
- target loss recovery: HOLD -> CLIMB_AND_RETRY -> NORMAL_LAND fallback
@Jetrell

Jetrell commented May 14, 2026

Copy link
Copy Markdown

Most of the navigation functionality written of in this PR is already written about in the Wiki. And if it was only about the understanding of the features and tuning, INAV MC/VTOL would work extremely well under all conditions.
However the greatest short fall INAV has in fulfilling what you want to accomplish with WP and RTH VTOL automation is actually missed.

What you want to accomplish is an awesome goal. But it won't be as simple as hoped. Without specific improvements being made to the MC navigation flight targeting control.

I'll give you a run down.
INAV has a long time Collaborator that has added a lot of work over the last couple of years to increasing the navigation sensor precision of the project. In that time others have come along side him and also added improvements. This has been relative to both fixedwing and multicopter platforms.
The focus has been on better position estimation on the XYZ, under challenging conditions that sensors encounter during flight.
e.g.

  • Variations in GNSS EPH/EPV throughout the flight
  • Barometric sensor temperature and pressure fluctuations
  • Accelerometer vibrations from poor setup
  • Compass magnetic deviation
  • Pitot trust and fall-back
  • General AHRS handling

From this work, INAV can now hit an XY target within 1m most of the time. While hitting Z target can be considerably more inaccurate. Due to various conditions effecting a MC's altitude control targeting while in forward flight.
The result is that INAV navigation can now Tag the XY position target with high certainty.

But the area of navigation flight control that has practically never been touched or scrutinized. Is the XY and Z multicopter approach velocity control to the target position. Whether a WP or the RTH home coordinates.

The key word here is VELOCITY or SPEED of the approach to the WP or home/safehome.

It is an easy thing to Tag the target. But is a completely different thing to approach the target at a higher velocity, then make and hold that target position on the first attempt. Without having to either backup to the XY target or climb/descend to the Z target.
Backing up to the target can be difficult for a MC with a tail wind.
But it can lead to the utter destruction of a VTOL. Because they have so much more Wing, Fuselage, and Stabilizer area for the wind to push against. Making it near impossible for the MC motors to maintain stabilization control over the VTOL airframe under unpredictable wind conditions, when the navigation engine is also trying to drive the VTOL back to the target it overshot.
Besides that. The point at which slowdown occurs at present is based on nav_wp_radius. With this setting being impossible to tune properly under all wind direction conditions. With it being even more difficult for what you require for a VTOL. Because the aircraft not only has to work out at what point to initiate slowdown or stop for a WP pause. But it also has to first transition from a FW to a MC in that same distance. Which will lead to massive overshoot of the WP or RTH home target. Especially with a tailwind.

I also touched on this very issue just recently. If you want to read both my comments in this issue report. And the first comment as well.

Currently the means INAV uses to alter and tune MC approach velocity, before a stop or turn, are these three under the topic- Settings that can influence position accuracy:

Originally when INAV MC WP flight navigation was added. nav_mc_bank_angle and nav_auto_speed where set very low. This made position accuracy much greater. But now days the defaults for both of these settings, which control navigation speed, have been increased. And rightly so. You can't set-out on a WP mission flying at the old default maximum flight speed of 30km/h, and bank angle of 15degs. Then expect the copter will make head way if it encounters even a mild headwind.

I have thought about a way this issue could be address over the years.
Ideally MC wind estimation would help greatly. But it adds so much more setup complexity to the project for users, than FW wind estimation does, that it just wouldn't be worth it.

Present rolling velocity target control is driven by a ControlDerivative related settings nav_mc_vel_xy_dterm_attenuation.
But it uses a more stepped approach to control navigation bank angle.


What is effectively required is an assessment of the distance to the XY target position, as well as approach velocity, not a fixed slowdown point. So it can dynamically adjust the point at which slow down occurs, based on those factors, and the bank angle the copter or VTOL is presently cruising with.
Then apply a reduction to the navigation pitch/roll bank angle. So the copter/VTOL can begin to transition and COAST into the WP. (better to undershoot with a tailwind, than to overshoot)
You don't want it to brake until it is moving at a much lower speed: just before the target is reached.. Braking adds even more heading trajectory drift and instability for VTOL's in MC flight.
This is also the reason nav_mc_wp_slowdown doesn't work very well in frontal cross winds, when slowing down. Because it is hard to hold the heading on the target when the nose of the MC is banked backward to brake.. It just gets blown of course and has to realign once braking has finished. And all this with the Yaw axis also causing control instability while trying to fight a possible incorrect wind offset, with respect to the direction the planes vertical stabilizer fin is facing that wind offset.

I know this is a big read. But It needs to be addressed if you want better success with your goal.
VTOL's crash easier if the wind speed is higher and its direction is unpredictable.

…rify MSP/docs

- Add USE_PRECISION_LANDING compile-time guard in target common defaults
  (enabled for larger-flash targets via common policy)
- Wrap precision landing API/state/config fields with USE_PRECISION_LANDING
  in navigation headers and runtime integration paths
- Guard precision landing MSP handler (MSP2_INAV_SET_PRECISION_LANDING_TARGET)
  and related OSD/nav-state mappings
- Make nav_precision_landing* CLI settings conditional on USE_PRECISION_LANDING
- Update Navigation/MSP docs:
  - build-time availability note
  - precision landing scope/limitations (final correction layer)
  - conservative "Why not SET_WP?" explanation
  - clarify timestamp semantics (informational; freshness by FC receive time)

This keeps behavior unchanged when precision landing is not compiled in and
improves compatibility for flash-constrained targets.
@Jetrell

Jetrell commented May 14, 2026

Copy link
Copy Markdown

Have you tested this feature in Poshold Landing descent ?
As mentioned in my last advisory post. The navigation position control on the XY is presently rather good (9.1) when the craft is moving at slower speeds, once the target is met. If your GNSS precision is good and the mag is setup and calibrated properly.
Meaning, under these conditions, I very rarely experience much XY drift from the target with my VTOL's, when even landing in stronger winds.
If drift is experienced. It is generally cause by accelerometer vibrations affecting the position estimation.

My point is. You are using a large number of setting variables here. Which are a limited resource.
And I feel they likely won't be required.

EDIT:
Most landing target inaccuracy on the XY occurs because the user arms when the GNSS position accuracy is low, not long after power-up. Then as the flight progresses and the accuracy becomes better. The MC will return and actually land at the correct position coordinates. Not the coordinates it saved as home at the beginning of the flight, which may have had an error of a meter or two,
If you want absolute landing precision from the exact position you launched from everytime. The only way to ensure this, is to wait 13mins after power up for the almanac and ephemeris data to fully update in the GPS module. Then arm and take off.

@mart1npetroff

mart1npetroff commented May 15, 2026

Copy link
Copy Markdown
Author

I will be testing this and VTOL auto transition next week probably.
Waiting 13 minutes for GPS data after power up is something I did not try but sounds reasonable and definitely I will try and confirm.
Currently I’m getting landing with around 50 cm up to 2 m offsets.
I also see your concerns about variables and memory and will have that on my mind.
Will share videos from all my tests including target landing without code changes just waiting long enough after power up.

UPDATE: just saw MSP2_INAV_GPS_UBLOX_COMMAND will try to use this one to update almanac and ephemeris data after power up instead of waiting and consuming power for electronics.

…itch controller setting

- Rename per-mixer manual transition setting:
  - `mixer_manual_vtol_transition_controller` -> `mixer_vtol_manualswitch_autotransition_controller`
- Keep per-mixer scope only where profile-specific behavior is intended:
  - `mixer_vtol_transition_dynamic_mixer`
  - `mixer_vtol_transition_airspeed_timeout_ms`
  - `mixer_vtol_transition_scale_ramp_time_ms`
  - legacy/profile-switch settings (`mixer_automated_switch`, `mixer_switch_trans_*`)
- Move these transition tuning parameters from mixer profile scope to global system scope:
  - `vtol_transition_to_fw_min_airspeed_cm_s`
  - `vtol_transition_to_mc_max_airspeed_cm_s`
  - `vtol_transition_lift_end_percent`
  - `vtol_transition_mc_authority_end_percent`
  - `vtol_transition_fw_authority_start_percent`
- Update transition logic to read moved fields from `systemConfig()` instead of `currentMixerConfig`
- Remove moved fields from `mixerConfig_t`; add them to `systemConfig_t`
- Bump PG versions for layout changes:
  - `PG_MIXER_PROFILE`: 2 -> 3
  - `PG_SYSTEM_CONFIG`: 7 -> 8
- Update docs and regenerate CLI settings docs:
  - explicit per-mixer vs global scope notes in VTOL/MixerProfile docs
  - `docs/Settings.md` regenerated via `update_cli_docs.py`
- remove unused automated-transition artifacts:
  - drop MIXERAT_PHASE_DONE
  - drop unused mixerProfileAT fields (transitionInputMixing, transitionStabEndTime, transitionTransEndTime)
- fix transition finalize ordering:
  - apply final progress/scaling before profile hot-switch
  - avoid final scale computation using post-switch mixer profile config
- document airspeed-timeout behavior explicitly:
  - mixer_vtol_transition_airspeed_timeout_ms applies only in trusted pitot (airspeed-controlled) path
  - timer fallback path uses mixer_switch_trans_timer when pitot is unavailable/unhealthy
- update VTOL and MixerProfile docs with practical test presets:
  - three English test profiles for VTOL ~1.0m wingspan / ~1720g AUW
  - legacy-compatible baseline
  - airspeed-first dynamic scaling
  - mission-authorized transition integration
- add explicit safety guidance for manual RC setup:
  - require dedicated 3-position switch mapping
  - warn that overlapping MIXER PROFILE 2 and MIXER TRANSITION modes can cause order-dependent, unpredictable behavior
- recompute manual transition-controller enable flag after potential direct
  MIXER PROFILE 2 hot-switch in outputProfileUpdateTask(), so per-profile
  manual-controller config is applied with current profile context
- add new debug mode `VTOL_TRANSITION`
  - extend debug enum with `DEBUG_VTOL_TRANSITION`
  - register CLI/debug name `VTOL_TRANSITION`
  - add settings table entry for `debug_mode`
- instrument VTOL transition controller in mixer_profile task loop:
  - debug[0] = phase
  - debug[1] = request
  - debug[2] = direction
  - debug[3] = progress x1000
  - debug[4] = pusherScale x1000
  - debug[5] = liftScale x1000
  - debug[6] = blendToFw x1000
  - debug[7] = flags bitfield (active, usedAirspeed, hotSwitchDone, aborted)
- improve controller consistency:
  - recompute manual transition-controller enable flag after potential direct
    MIXER PROFILE 2 hot-switch so per-profile setting is evaluated in current context
- docs updates (VTOL/MixerProfile):
  - clarify direct `MIXER PROFILE 2` path vs controller-driven `MIXER TRANSITION` path
  - document airspeed-timeout scope (airspeed-controlled path only)
  - recommend non-zero `mixer_switch_trans_timer` fallback for airspeed-first setups
  - add explicit 3-position switch mapping warning and note that overlapping
    PROFILE2/TRANSITION activation is order-dependent and unpredictable
  - add VTOL transition debug mode usage and channel map
-  `docs/Settings.md` after debug mode table update
…ssful

  transition frames remain visible in Blackbox
- document VTOL debug mode usage and debug channel meanings
… mode flags

- Report MIXER TRANSITION from internal transition activity when manual auto-transition controller is enabled
- Report MIXER PROFILE 2 from the currently active mixer profile (not raw RC request)
- Preserve legacy MIXER TRANSITION reporting when manual auto-transition controller is disabled
…ance

- rename feature guard: USE_PRECISION_LANDING -> USE_MARKER_GUIDANCE
- rename MSP command: MSP2_INAV_SET_PRECISION_LANDING_TARGET -> MSP2_INAV_SET_MARKER_GUIDANCE_TARGET
- hard-break MSP payload to 4 bytes (offsetForwardCm, offsetRightCm) and drop legacy fields/compat code
- switch to mode-based control (OFF/PL/CONTAINMENT) and remove separate enable flag
- keep marker guidance state minimal and mode-gated for allowed nav contexts
- rename/update marker-related settings and docs for consistent terminology
Skip climb-and-retry when a PL LAND marker target is lost below the configured AGL threshold. Add an optional setting to lock the current XY target during low-altitude fallback so landing can continue without chasing the original GPS target.

Update marker guidance settings and navigation docs.
Add a post-correction XY speed clamp in multicopter navigation so marker guidance cannot push desired velocity above maxSpeed.
Rename marker lost-hold OSD text to "MARKER LOST" in both classic and DJI OSD views.
Add global NAV settings for transition failure handling:
- nav_vtol_transition_fail_action_mc_to_fw (IDLE/POSH/RTH/EMERGENCY_LANDING)
- nav_vtol_transition_fail_action_fw_to_mc (IDLE/LOITER/RTH/EMERGENCY_LANDING/FORCE_SWITCH, default LOITER)
- nav_vtol_transition_retry_on_airspeed_timeout

Implement one-shot MC->FW retry after airspeed timeout (pitot-gated), including yaw scan/alignment.
Handle fail actions in MIXERAT paths (mission and RTH), including FORCE_SWITCH fallback.
Expose airspeed-timeout abort reason from mixer transition state.
Regenerate settings docs.
… POSHOLD

Add step/overall timeouts to MC->FW retry scan, fail retry when no trusted pitot sample is collected, and require valid pitot data before starting retry. Update FW->MC LOITER/FORCE_SWITCH fail-event mapping to POSHOLD_3D and align settings/docs description.
…etry settle timing

Suppress direct BOXMIXERPROFILE hot-switch while manual transition trigger is active to prevent FW->MC direction regression. Bump PG_NAV_CONFIG to 9 and make retry settle timing start after heading tolerance is actually reached.
…TION switch OFF edge, за да не сменяме semantics mid-session.
Use mixer_vtol_transition_scale_ramp_time_ms for MC->FW pusher ramp
independently of airspeed progress, so the pusher can reach full authority
without being limited by low initial airspeed.

Keep lift, MC authority and FW authority scaling on the existing handoff path:
airspeed-based when trusted pitot is available, with timer/progress fallback
when it is not.

Update VTOL and mixer profile docs to describe the split scaling behavior.
Add conservative VTOL multicopter protection logic that is disabled by
default and only applies to VTOL aircraft in MC mode. The protection keeps
fixed-wing mode and normal multicopters unchanged.

Add VTOL MC protection helpers, configuration, and debug visibility for:
- detecting when VTOL MC protection is active
- applying protected altitude throttle bounds before altitude PID anti-windup
- preserving hover throttle inside the protected range
- reporting when reserve bounds had to be shrunk
- tracking capture, settle, landing-settle, bailout, and yaw-shaping state

Add altitude authority protection for VTOL MC navigation:
- reserve low-side and high-side throttle authority for attitude control
- feed the protected throttle range into the altitude PID limits
- freeze/relax altitude integrator during protection/bailout conditions
- avoid allowing altitude hold to consume the full throttle range

Add VTOL MC capture and settle behavior:
- damp/settle after entering NAV instead of immediately latching an aggressive
  position target
- avoid rubber-banding to the initial release point
- gate normal NAV behavior on stable speed/attitude conditions
- reuse existing navigation limits where practical to avoid extra settings

Add conservative ANGLE/HORIZON shaping for VTOL MC protection:
- only active with NAV_AND_STABILIZED protection mode
- only when armed, in VTOL MC mode, not fixed-wing, with trusted velocity
- scales yaw, pitch and roll continuously with horizontal speed

Add VTOL MC landing settle gates:
- require stable position/velocity/attitude before starting landing descent
- cap large waypoint radii through a named helper instead of using raw magic
  constants
- use waypoint landing position for mission LAND and home/final land target for
  RTH landing

Fix mission VTOL transition handling:
- add the missing FSM transition from WAYPOINT_PRE_ACTION to MIXERAT_INITIALIZE
- wait at the transition waypoint until XY and altitude requirements are met
- use nav_wp_enforce_altitude as the mission transition altitude tolerance when
  configured, otherwise fall back to a named conservative tolerance
- avoid rejecting a mission transition immediately just because altitude has not
  been reached yet

Harden multicopter landing detection:
- prevent autonomous landing detection while vertical speed is still significant
- keep the vertical-speed hard gate independent from nav_land_detect_sensitivity
- require final slow-descent demand before autonomous NAV landing detection
- require throttle to be genuinely low relative to hover and idle throttle
- avoid relying on barometric absolute altitude as proof of landing
- keep emergency/non-autonomous landing detection on its separate path

Add focused unit coverage for VTOL MC protection logic:
- default OFF and non-VTOL no-op behavior
- throttle reserve bounds and reserve shrink cases
- settle timer pass/reset behavior
- landing radius cap behavior with large nav_wp_radius
- yaw shaping continuity and no-op cases
- Add VTOL mission transition precondition handling and tests
- Add VTOL MC protection logic for throttle reserve, settle checks, command shaping, bailout, and landing confirmation
- Improve VTOL MC landing detection with throttle-probe confirmation and safer bump handling
- Document manual and mission VTOL auto-transition setup, dynamic scaling, pusher and tilt-servo examples
- Clarify related VTOL, navigation, landing, airspeed timeout, retry, and fail-action settings
Allow navigation-owned RTH/LAND VTOL transitions to continue during failsafe
while still aborting unsafe manual or mission transition requests. Keep the
post-switch output ramp active after the target profile is selected so failsafe
does not cause an abrupt transition output reset.

Move auto-transition target PID and motor-mix preparation out of F7 FAST_CODE
hot paths, prevent LTO from inlining transition helpers into ITCM, and avoid
repeated pusher-scale reads inside the motor loop. This fixes the
OMNIBUSF7/OMNIBUSF7V2 16 KB ITCM build pressure without changing transition
behavior.

Add policy tests for failsafe-allowed transition requests and post-switch ramp
continuation.
Add shared OSD messages for VTOL auto-transition phases, including
manual transitions, mission transitions, RTH/landing transitions, retry
scan/align states, aborts, airspeed timeouts, completion, and low-speed
FW-to-MC safety fallback.

Extend vtol_fw_to_mc_auto_switch_airspeed_cm_s from manual-only
protection to a navigation-owned safety fallback for mission, RTH, and
failsafe RTH. When trusted pitot airspeed drops below the configured
threshold in FW mode, navigation can request a FW-to-MC transition if
mixer_automated_switch is enabled and a valid MC target profile exists.

Keep the current NAV session in MC after the low-speed fallback to avoid
repeated MC->FW->MC loops. Resume mission and RTH flow after the fallback,
including waypoint enroute/hold and RTH near-home states, while ignoring
later mission USER=FW requests until navigation is restarted.

Document the updated VTOL transition, RTH/failsafe, stabilization, and
landing-detection behavior, and add policy test coverage for request
gating, trusted-low-airspeed triggering, and failsafe handling.
Smooth auto-transition target servo outputs when entering transition so FW/MC
surface preview rules do not cause an immediate output jump.

Keep a completed manual auto-transition session owning the profile switch until
the physical profile switch matches the active target profile. This prevents an
AUX gap or middle transition position from switching back to the previous mixer
profile after a successful hot-switch.

Clear stale transition mixing after a completed auto transition while preserving
new transition rising edges, so pusher/lift scaling and transition servo state do
not remain active after the state machine is idle.

Add unit tests for completed auto-session profile ownership, release behavior,
and stale mixing cleanup.
Prevent MR braking mode from taking over XY target handling while VTOL MC
protection is active, so VTOL capture can keep controlling the hold target
without being blocked by NAV_CRUISE_BRAKING. Add small helpers for current
position hold target and braking state visibility, and cover the suppression
policy with a unit test.
Release completed manual auto-transition sessions when MIXER TRANSITION is switched off, so moving the switch to an endpoint after a completed transition allows the normal direct profile switch path instead of keeping the old completed session latched.

Update the transition logic unit test to cover the falling-edge endpoint release behavior.
Prevent direct manual profile switches and direct transition aborts from using
auto-transition servo handoff smoothing. Direct switch now clears transition
handoff state and switches immediately to the requested profile.

Add blinking VTOL OSD reminders after automatic manual transitions and after
NAV/mission handback when the physical mixer switch does not match the active
profile. Show MOVE SWITCH TO FW/MC until the pilot confirms the active endpoint,
including DJI HD OSD support.

Hold the active mixer profile after NAV releases profile ownership if the manual
switch is still in transition position or points to a different profile, avoiding
an unexpected direct switch when a mission ends or WP mode is disabled.

Add unit tests for manual switch reminders, navigation handback hold/clear
logic, and remove the obsolete direct-switch servo hold test.
Add target-profile output smoothing for auto-transition cases where the
active mixer does not own the final transition output yet.

- Preview target MC tilt-servo transition/static output during FW->MC when
  the FW profile has no transition-linked rule for that servo
- Smooth target-only MC lift/tail motor output from the current real output
  toward the target MC lift output during FW->MC
- Keep old lift/pusher motor shutdown smoothing after profile hot-switch
- Add VTOL transition OSD/debug wait reasons for FW->MC:
  WAIT MC SPEED, NO SPEED, MC SPEED HIGH
- Clarify hardware pitot vs Virtual Pitot timer fallback behavior
- Clarify lift base throttle vs MC stabilisation authority settings
- Document manual throttle considerations during VTOL transitions
Treat an explicitly configured PITOT_VIRTUAL with a valid airspeed estimate
as a usable VTOL transition airspeed source. Apply the shared usable
airspeed check to manual auto transitions, FW->MC low-speed protection,
hot-switch readiness, and mission/RTH/failsafe transition retry logic.

Keep timer fallback behavior when no usable airspeed source is available,
and avoid using failed or missing pitot readings. Update VTOL, mixer profile,
settings YAML, and generated Settings docs to explain real pitot vs virtual
pitot behavior.
Introduce vtol_autotransition_always so an armed manual VTOL
profile switch can start the auto-transition controller instead of
directly switching profiles, while keeping disarmed direct switching
available for bench and preflight checks.

Add transition helper tests for profile-switch autotransition gating,
owned-state exclusion, disarmed direct switching, and aborting back to
the current profile before hot-switch.

Report abort result more clearly with FW/MC-specific OSD messages, and
document the two-position workflow, instant FW->MC setup, and which
source mixer profile owns each transition direction's settings.
- add MC/FW automatic transition state machine for manual and mission requests
- blend pusher, lift, MC/FW authority, target surfaces, and transition servo outputs
- preserve immediate direct switching and legacy behavior when the controller is disabled
- handle aborts, retries, failsafe paths, profile changes, and completed mission waypoint advance
- avoid post-transition loiter when a valid mission transition temporarily climbs above its waypoint altitude
- add transition debug/OSD visibility, unit coverage, and detailed VTOL/settings documentation
- ignore manual mixer-profile and transition switch edges while navigation owns
  a mission, RTH, landing, or protection-driven transition
- report effective mixer profile and transition state in Active Modes instead
  of reflecting an ignored RC switch position
- smooth confirmed airspeed-progress changes in both directions to prevent
  common lift/authority steps from noisy airspeed samples
- preserve output continuity when FW->MC enables new lift motors, while
  bounding their PID handoff to a short safe interval
- add a mission MC capture state after FW->MC when a non-advanceable
  waypoint must be resumed, holding the current position until momentum
  decays before rebasing waypoint geometry
- treat a successful FW->MC FORCE_SWITCH as reaching the requested profile,
  allowing an already accepted normal waypoint to advance
- keep HOLD, LAND, altitude-incomplete, sensor-loss, abort, mode-change,
  and waypoint-jump paths safe and non-leaking
- add focused unit coverage for transition policy, airspeed progress,
  motor handoff, mission capture, abort, and force-switch decisions
Add an isolated first tailsitter transition path for the canonical
AIRPLANE <-> MULTIROTOR orientation-offset profile pair.

FW-to-MC now requires valid airspeed below the configured MC limit,
does not fall back to the transition timer, and aborts safely on
airspeed timeout. After the MC hot-switch, retain the 45-degree
tailsitter target until the MC attitude is captured and stable.

Reverse requests during the capture phase use the existing MC-to-FW
transition path instead of a direct profile switch.

Keep dynamic mixer, mission, RTH, landing, failsafe, low-speed
protection, and VTOL MC protection disabled for tailsitters in this
first version. Add OSD capture status, focused unit coverage, and
tailsitter configuration documentation.
- wait for the manual switch to match the active profile after NAV handback
- maintain heading during mission MC-to-FW transitions and retries
- latch a successful landing settle and restart it only after unsafe drift or attitude
- keep the VTOL PosHold capture target one-shot and out of pilot/NAV-owned targets
- add regression coverage for handback, landing, and capture edge cases
- preserve ordinary waypoint acceptance recorded before VTOL transition
- advance to the next waypoint after the requested profile becomes active
- ignore temporary altitude loss or gain during successful MC/FW transitions
- keep HOLD_TIME, LAND, aborted, and failed transitions from advancing
- document FORCE_SWITCH and output handover behavior
- report VTOL MC protection debug state only while protection is actually active
- update mission transition and protection unit tests
- suspend fixed-wing Auto Speed while the VTOL transition controller owns throttle
- reset Auto Speed state and resume from the live throttle on a fresh velocity sample
- resolve waypoint operands relative to the selected mission with strict bounds checks
- preserve waypoint altitude datum when calculating Programming Framework distances
- preserve PINIO channel indexes when configured pads are unavailable or already claimed
- add regression tests and document the updated behavior
…av-set-precision-landing-and-posh-target

# Conflicts:
#	src/main/msp/msp_protocol_v2_inav.h
#	src/main/navigation/navigation.c
#	src/main/target/common.h
…ition-state' into msp2-inav-set-precision-landing-and-posh-target

# Conflicts:
#	src/main/navigation/navigation.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants