Thanks for the answer. I would rather do it onboard.
Don't you think that the logic should be added in the commander module rather than in the pos_control module ?
I think of two possibilities:
- enable the attitude controller first, then the position controller can be enabled when roll and pitch angles are small,
- or enable both immediately, but use only altitude info from barometer at first (no laser or US rangefinder, which would not give height info because of high roll&pitch angles).
For starting motors quickly, I think that we could use the same approach than what was done with the killswitch here : motor's outputs would be inhibited until free-fall is triggered...