Introduction
Bringing a drone safely back to the ground and turning off its motors is a critical step to avoid damage or accidents. Without proper landing and disarming, the drone could crash or keep its motors running, which is unsafe.
Imagine parking a bicycle: you slow down carefully to stop without falling, then put the kickstand down to keep it steady. Only after it’s stable do you let go. This is like landing and disarming a drone.
┌───────────────┐
│ Drone Flying│
└──────┬────────┘
│
↓
┌───────────────┐
│ Controlled │
│ Descent │
└──────┬────────┘
│
↓
┌───────────────┐
│ Landed on │
│ Ground │
└──────┬────────┘
│
↓
┌───────────────┐
│ Motors │
│ Disarmed │
└───────────────┘disarm() in drone programming?disarm() function is used to stop the drone's motors, which stops the propellers from spinning.land()?land().drone.arm() drone.takeoff() drone.land() drone.disarm() print(drone.status)
status shows 'disarmed' after disarming.disarm(), the drone's status changes to 'disarmed'.drone.land safety = drone.disarm()
drone.land without parentheses, so the function is not called.drone.disarm() to safety is valid, and disarm after land is correct.land() first, then disarm(), which is correct.Pass the test and this pattern moves unknown