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.

Usage instructions:

  1. 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 Bindings yourself.
  2. Modify lines 30 and 31 of this script to change display size to whatever you prefer. Default is 800x600 window mode.
  3. Run "ppython.exe JSBSim-Demo.py" to start the demo. Please notice it is "ppython.exe" and not "python.exe".
  4. 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 engine.
  5. 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.
  6. 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.
  7. At about 50 ft altitude press "f" to remove the flaps and reduce mixture to 69 %.
  8. 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 module.
  9. Have fun.
SourceForge.net Logo    Python Logo