...
At signal (Not when powered on) can descend using a state in path manager that passes targets to attitude manager
At another signal transitions out of landing state
When altitude has been constant for a few seconds and below threshold then transition out of landing.
Later steps:
Ensure drone is in a hover before descending
After descent, transitions to a standby or disarmed state
Update the target ground height with a sensor (Would be nice to stop assuming earth is flat)
Use Passby control to “spin down” motors to 20% throttle after landing (in standby state), increases motor longevity and can prevent motor cogging.
Use optical Flow sensor to keep waypoint targets perfectly vertical
Add a better landing detection system (possibly with optical flow sensor)
...