...
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)
...
https://www.desmos.com/calculator/tjtx8ogtno
Code Prototype:
...
breakoutMode | wide |
---|---|
language | cpp |
...
Waypoint-based Landing Takeoff Manager (Not for 2023 Competition):
Not in use as velocity target provide smoother flight.
Use waypoints as targets that the drone attempts to meet at a set frequency. As drone approaches target, shorten the distance to the next waypoint to slow down drone ascent.
...