Auterion / px4-jsbsim-bridge

JSBSim bridge for PX4 SITL/HITL simulations
BSD 3-Clause "New" or "Revised" License
26 stars 38 forks source link

Enable faster than realtime execution #29

Closed Jaeyoung-Lim closed 4 years ago

Jaeyoung-Lim commented 4 years ago

Problem Description When running Software-In-The-Loop simulations, executing the simulation faster than realtime allows quicker iterations on development. This is already utilized in PX4 SITL Gazebo and jmavsim, and the mavlink HIL Sensor messages already support it.

Solution This enables setting the realtime factor with environment variable PX4_SIM_SPEED_FACTOR to allow faster than realtime execution of the simulation. This environment variable is already used for other simulators for faster than real time execution.

@RomanBapst Here you go!

Testing To test, you can set the environment variable on execution.

PX4_SIM_SPEED_FACTOR=20 make px4_sitl jsbsim