Introduction
Flying a drone on a real mission can be risky and costly if something goes wrong. To avoid mistakes and ensure safety, pilots use simulations to practice and check missions before the actual flight.
Imagine a driver using a video game to practice a difficult race track before driving it for real. The game shows the turns and obstacles so the driver can plan the best way to finish safely and quickly.
┌───────────────────────────────┐
│ Mission Planning │
└──────────────┬────────────────┘
│
▼
┌───────────────────────────────┐
│ Simulation Software │
│ (Virtual Flight Environment) │
└──────────────┬────────────────┘
│
▼
┌───────────────────────────────┐
│ Review & Adjust Mission Plan │
└──────────────┬────────────────┘
│
▼
┌───────────────────────────────┐
│ Real Drone Flight │
└───────────────────────────────┘runMissionSimulation in drone programming APIs.mission = ['takeoff', 'fly_forward', 'turn_left', 'land'] result = runMissionSimulation(mission) print(result)
mission = ['takeoff', 'fly_forward', 'land'] result = runMissionSim(mission) print(result)
runMissionSimulation, not runMissionSim.mission = [
'takeoff',
'fly_forward',
{'if': 'sensor_left_clear', 'then': 'turn_left', 'else': 'turn_right'},
'land'
]
result = runMissionSimulation(mission)
print(result)Pass the test and this pattern moves unknown