Introduction
Imagine needing to see or deliver something in a place that's hard to reach or dangerous for people. Drones solve this problem by flying remotely without a pilot onboard, making tasks safer and easier.
Think of a drone like a remote-controlled toy helicopter that can also follow a map on its own. Just like you can steer the toy or set it to go to a spot, drones can be guided by people or fly by themselves to do useful jobs.
┌─────────────────────────────┐ │ Drone (UAV) │ ├─────────────┬───────────────┤ │ Components │ Control & │ │ │ Navigation │ │ - Motors │ ┌─────────┐ │ │ - Propellers│ │ Remote │ │ │ - Battery │ │ Control │ │ │ - Sensors │ └─────────┘ │ ├─────────────┴───────────────┤ │ Uses │ │ - Photography │ │ - Delivery │ │ - Farming │ │ - Search & Rescue │ └─────────────────────────────┘
takeoff() is used to make the drone lift off the ground.fly() is not a standard command; land() and stop() are for ending flight or stopping.drone.takeoff()
print('Flying')
drone.land()
print('Landed')takeoff(), then prints 'Flying', then calls land(), then prints 'Landed'.drone.takeoff() drone.fly_to(10, 20) drone.land()
takeoff(), fly_to(), and land() are valid if drone is ready; sequence is correct.drone.takeoff() drone.fly_to(5, 10) drone.hover(3) drone.land()follows the correct order: takeoff, fly_to, hover, land. Others have wrong order.
drone.takeoff() drone.fly_to(5, 10) drone.hover(3) drone.land()[OK]
Pass the test and this pattern moves unknown