Introduction
Starting a drone flight safely requires a clear sequence of steps to prepare the drone and lift it off the ground. Without proper preparation, the drone might not respond or could behave unpredictably during takeoff.
Imagine starting a car trip: first, you turn the key to start the engine (arming), then you check your mirrors and seatbelt (safety checks), and finally, you press the gas pedal to move forward (takeoff). Skipping any step could cause trouble on the road.
┌───────────────┐
│ Start Flight │
└──────┬────────┘
│
▼
┌───────────────┐
│ Arm Drone │
└──────┬────────┘
│
▼
┌───────────────┐
│ Safety Checks │
└──────┬────────┘
│
▼
┌───────────────┐
│ Takeoff Command│
└───────────────┘drone.arm() drone.takeoff(10) print(drone.altitude)Assuming the drone starts at altitude 0 and takeoff sets altitude to the given height.
drone.takeoff(5) drone.arm()
Pass the test and this pattern moves unknown