The PteroSim UAV simulation platform offers drone developers a way to run full autopilot stacks, including PX4, ArduPilot, and Betaflight binaries, directly inside a simulated environment, no airfield required. Built by AlexanderRex, PteroSim is designed as a comprehensive test bench for autonomous aerial vehicles, handling everything from sensor data injection to actuator command processing in a closed loop that mirrors what a real craft would experience in flight.
How the PteroSim UAV Simulation Platform Works
The architecture is straightforward but thorough. The autopilot software, whichever binary you choose to run, receives simulated sensor data exactly as it would from physical hardware. It then produces actuator commands in response, just as it would aboard an actual vehicle. That feedback loop is the heart of software-in-the-loop testing, and PteroSim closes it cleanly.
Flight dynamics are handled by JSBSim, an open-source flight dynamics model with a long history in simulation work. The resulting scene is then rendered in Unreal Engine 5, which means the visual output is as polished as you would expect from a modern game engine. The combination gives you something genuinely useful: a physically plausible flight model presented in an environment detailed enough to make spatial reasoning about the vehicle feel real.
For anyone who has spent time tuning PID controllers or experimenting with autopilot settings, the appeal is immediate. Heading out to a field costs time. Wind, rain, and battery logistics eat into a session before you have even armed the craft. Crashing hardware during a tuning run is an expensive way to learn that a rate gain was too aggressive. PteroSim removes all of that friction, letting iteration happen at the speed of a configuration file edit rather than a round trip to a flying site.
Software-in-the-Loop Versus Hardware-in-the-Loop Approaches
PteroSim sits in the software-in-the-loop category, meaning the autopilot binary runs natively inside the simulation rather than on dedicated flight controller hardware. That approach maximises flexibility, particularly during early development when firmware may still be in flux. You can swap binaries, adjust flight dynamics parameters, and run multiple test scenarios without touching a soldering iron.
A complementary approach exists for teams who need to validate firmware running on the actual flight controller silicon. Hardware-in-the-loop (HITL) testing connects real flight controller hardware into a simulated environment, so the physical processor, memory, and peripheral interfaces are exercised alongside the software. The UAV HITL Simulator, listed on GitHub, is designed precisely for this: a professional HITL environment for validating drone firmware and control stacks on a real flight controller, safely on the bench. Where PteroSim gives you speed and portability, HITL workflows like this one give you confidence that the firmware behaves correctly when it is actually running on the target hardware.
Neither approach is universally superior. In practice, teams often use both: software-in-the-loop for rapid iteration during development, hardware-in-the-loop for pre-flight validation before committing to field testing. PteroSim fits naturally into the first stage of that pipeline.
What makes PteroSim particularly practical is its support for three of the most widely used autopilot ecosystems. PX4, ArduPilot, and Betaflight cover an enormous slice of the autonomous aerial vehicle landscape, from racing quads running Betaflight’s fast-loop control to fixed-wing and multirotor platforms built around ArduPilot’s extensive mission planning capabilities, to PX4’s modular, POSIX-friendly architecture. Supporting all three in a single test bench means the platform is useful across a wide range of projects without requiring the developer to maintain separate simulation environments.
AlexanderRex has published PteroSim as a platform others can build on, with the flight dynamics and rendering pipeline already in place. For anyone working on autonomous aerial vehicles who wants to tighten their development loop before the craft ever leaves the ground, that is a solid foundation to start from.

