Introduction
Choosing the right drone can be confusing because there are different types designed for different tasks. Each type solves unique problems like stability, flight time, or carrying capacity.
Imagine three types of flying machines: a helicopter that hovers easily, a bigger helicopter that can carry more weight and keep flying even if one engine stops, and an airplane that flies far but needs a runway to take off and land.
┌───────────────┐
│ Fixed-wing │
│ Drone │
└───────┬───────┘
│
┌───────────┴───────────┐
│ │
┌─────┴─────┐ ┌─────┴─────┐
│ Quadcopter│ │ Hexacopter│
│ (4 rotors)│ │ (6 rotors)│
└───────────┘ └───────────┘drone = {'type': 'hexacopter', 'rotors': 6}
if drone['rotors'] == 4:
print('Quadcopter')
elif drone['rotors'] == 6:
print('Hexacopter')
else:
print('Other')drone = {'type': 'fixed-wing'}
if drone['type'] = 'quadcopter':
print('Quadcopter detected')
else:
print('Other drone type')Pass the test and this pattern moves unknown