JSBSim Python Bindings
JSBSim and JSBSim Python Bindings have no native graphics output.
But it is easy to integrate JSBSim with Python based game or graphics engines.
At the time of the first release there is one demo in the downloads section that
demonstrates how to integrate JSBSim with Panda3D.
To run the Panda3D demo you will have to have Panda3D 1.3.2 installed.
You can download the Panda3D game engine here.
The Panda3D demo implements a very, very minimal flight simulator. It is intended
to shoh how integration can be done, and hence tailord for simple, clear code and not
for graphical quality.
Only the most essential controls have been implemented, and only in such a way that
it is easy to take off and fly around a few minutes.
- Install Panda3D 1.3.2 (Windows). Of course you can use the demo with the
Linux version of Panda3D too, but then you have to compiled JSBSim Python
- Modify lines 30 and 31 of this script to change display size to whatever
you prefer. Default is 800x600 window mode.
- Run "ppython.exe JSBSim-Demo.py" to start the demo. Please notice it is
"ppython.exe" and not "python.exe".
- Press "e". This will do the following things: set magnetos to "both",
fuel mixture to 87 %, flaps to 32 %, throttle to 25 % and finally start the
- Press "page-up" until throttle is at 100 %. page-up/down controls the
throttle. You can use it later, when you are airborne, to trim the plane.
- Wait until the plane accelerates and finally takes off at around 110 fps.
You don't need to pull the joystick or do anything else. The plane will take
off by itself.
- At about 50 ft altitude press "f" to remove the flaps and reduce mixture
to 69 %.
- Use the joystick to steer the plane. Joystick axis 1 controls the
aileron, axis 2 controls the elevator and axis 4 controls the rudder.
You might want to modify the code to use joystick axis 3 (axis 4 is the default)
for rudder control, or use your own input code in place of the small joystick
- Have fun.