===== Drone Simulators =====
Drone simulation software is recently more and more popular.\\
So far we distinguish two main purposes for drone simulation:
* Research and development;
* Operator's training;
Before moving to the details it is necessary to present some information in general: flight simulator is not only the software, running on the computer to visualize and entertain users: the common purpose is practice and development/experimentation to avoid risks related to the real world development where i.e. faulty firmware or software can break construction, hurt people and cause damage. This is important for both UAVOs and constructors/developers but their requirements are different. For this reason, we split drone simulators into two categories. Obviously, many of them can act as both.
Simulation for research and development usually requires the inclusion of the other components, more than just the simulator itself, but also other software and hardware i.e. ground control stations and RC controller. For this reason, this class of simulators includes the ability to simulate autonomous flight and involves popular hardware to be used as in the case of a real drone.
In details, this includes the use of the FC (most common is PX4 along with MAVLink protocol but other FC stacks are also supported, i.e. Ardupilot) as a part of the simulation, in opposition to the simulators for UAVO training only, where hardware use is limited with connecting an RC controller to the PC simulator at most, simply replacing the joystick to make the simulation as much realistic for the UAVO as possible.
There are two types of inclusion of the FCs into the simulation process for research and development simulation class: HIL / HITL (Hardware-In-The-Loop) and SIL/SITL (Software-In-The-Loop).
=== HITL ===
In the case of the Hardware-In-The-Loop, a physical FC device is connected to the simulator. Obviously, it uses only some features of the FC, i.e. use of IMU or connected GPS is impossible as hardware physically is stable and located in one place. It is common that FC interfaces with at least an RC receiver and RC transmitter, to let the user/operator perform operations. As FC interfaces PC simulator, the common communication port is then excluded so it may not be possible to integrate easily with ground control station solution but that varies (Figure {{ref>hitl}}).
=== SITL ===
In the case of the Software-In-The-Loop, FC hardware is replaced with a software module, usually running as a separate virtual machine (or Docker container). For PX4 SITL it is always a Linux solution, even in the case of the simulator running under Windows. Figure {{ref>sitl}} presents schematics.
==== Simulators for research and development ====
At the moment, there are multiple solutions, but the following simulators are freely available thus they are popular among a variety of users:
* AirSim by Microsoft (still Open-Source): [[https://github.com/microsoft/AirSim]]; This simulator is also suitable for UGV, not only for UAV, and its purpose is mostly to implement and test high level, AI-related solutions for autonomous vehicles. AirSim can integrate with ROS-based hardware (Robot Operating System) solutions. As it is implemented using popular gaming Unreal Engine (Unity-based version is on its way to the users), the graphics are astounding yet it requires a powerful GPU to run. The simulator provides a rich user experience with a natural-looking environment like interiors, cities, streets, parks, and so on (Figure {{ref>airsim}}). AirSim integrates seamlessly with PX4 hardware (HITL - Hardware In The Loop, a limited number of controllers) and PX4 software stack (SITL - Software In The Loop).
* Supported frames (models): Multirotor, vehicle, Quad-X for PX4.
* GAZEBO was developed as a pure Open-Source simulator for a variety of physical devices, also for UAVs and UGVs, but not limited to: [[http://gazebosim.org/]]; Its origin is to simulate robots. It provides simple graphics (Figure {{ref>gazebo}}), but the benefit is it can run on constrained hardware. The GAZEBO seamlessly integrates with the ROS environment. The simulator also provides an ORCE rendering engine for a realistic environment rendering, but the real power is the simulator's flexibility on configuration and simulation running, starting from constrained Linux-based machines, finishing on Amazon AWS, cluster, and cloud-based simulations. GAZEBO provides a variety of physics engines to choose between.
* Supported frames (models): Quad, Hex (Typhoon H480), Generic quad delta VTOL, Tailsitter, Plane, Rover, Submarine.
* FlightGear: [[https://www.flightgear.org/]] an open-source, multiplatform, and far beyond drone flight simulator with decent physics. Supports integration (via external tools) with Software-In-The-Loop (SITL) implementation of PX4 thus is suitable for mission planning as AirSim. FlightGear supports multi-vehicle simulation.
* Supported frames (models): Planes, Autogyro, Rover.
* JSBSim: [[http://jsbsim.sourceforge.net/index.html]] is and FDM implementation (Flight Dynamics Model) without visualisation frontside. Yet it can be integrated with i.e. FlightGear. JSBSim is in fact a mathematical and numerical model of the aircraft and its physic. Model simulation is highly advanced and based on the numerical data obtained from the number of experiments performed within the wind tunnel, so highly realistic.
* Supported frames (models): Plane, Quad, Hex.
* jMAVSim is a simple simulator for multi and quadrotors only, with a simple environment. It can include in the simulation PX4 FC, in both HITL and SITL scenarios and supports multi-vehicle simulations.
* supported frames (models): Quad.
==== Simulators for training of the operators ====
Many inexperienced operators found it useful to practice first, using virtual equipment, where any crash is virtually costless in opposite to the real devices.\\ For this purpose, many drone vendors provide simulators for training, i.e. DJI and Yuneec.\\
Most of the drone simulators of the operator's training class use a simplified physics model and graphics, which results in not so realistic UI in terms of simulation and graphics quality, yet good enough to practice the operator's reflexes.\\ Use of this kind of simulator is obligatory in many countries when practicing and preparing for professional UAVO certification, as the first step towards practical, outdoor part of the training.\\
Some simulators are composed just like a playground area for model flights while advanced present scenarios the virtual operator is supposed to implement, also verified in time and space, including time-limited and quality evaluated virtual exams. Simulators of this kind used to provide various airframes to choose between, different camera positions, i.e. one can observe the drone from the ground, or use the onboard camera, simulating FPV flight, and so on.\\ It is a common approach, that simulators are somehow open to connect any controller, as they used to be able to use a regular Joystick/Game controller that is visible in the operating system. There used to be hardware, mostly USB-based receiver that is capable to act like FC, where you can connect various Receivers thus use your own Controller. This approach introduces the natural latency of the RC link and the use of your familiar controller but that also requires some configuration of binding RC channels with appropriate software functions.
A non-exhaustive list of training drone simulator is juxtaposed below:
* DJI drone simulator: with great graphics, but limited to some of the selected DJI models.
* Zephyr: commercial and expensive, compatible with FAA regulations, FPV, and VLOS. Supports game controllers and professional RC controllers. Used in the US for training.
* droneSimPro: commercial, inexpensive but limited to XBOX and PS game controllers.
* Phoenix R/C Pro: commercial, expensive, supports over 200 different airframes including multi-rotors, helicopters, soarers, and planes.
* RealFlight: commercial, pretty expensive yet delivers a variety of scenarios and missions to do. Great and "lifelike" physics simulator (perhaps best on the market) including day/night, wind and gusts, and so on.
* Quadcopter FX: cheapest, not very versatile but good enough for beginners to practice elementary operations.
* Drone Racing League SIM: designated for FPV only.
* Hotprops FPV: not so advanced as aforementioned Drone Racing League, still for FPV beginners it is a good choice. And it is free, for Android.
* AeroSIM RC: versatile simulator with many versions including examination center for EU UAVO training centers (Figure {{ref>aerosimrc}}).
Most of those simulators use the HITL model only and hardware supported is usually limited to the proprietary.