navigation: add MSP precision landing target consumer for MC/VTOL#11554
Conversation
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
|
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. 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.
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. 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. 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. I have thought about a way this issue could be address over the years. Present rolling velocity target control is driven by a ControlDerivative related settings 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. I know this is a big read. But It needs to be addressed if you want better success with your goal. |
…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.
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.
Safety behavior: