Added automatic takeoff and landing code. To test.

Needs testing and tuning.