Skip to content

Tutorial Trimming Linearization GUI

jgoppert edited this page Apr 6, 2012 · 1 revision

The purpose of the JSBSim Trimming and Linearization GUI is to provide trim conditions and linear models for various aircraft modeled in JSBSim. The trim conditions can be used to evaluate aircraft performance and determine the aircraft's flight envelope. The linearization of the aircraft dynamics can be used to design control systems.

Selecting an Aircraft

First, you must select the aircraft which you wish to evaluate:

  • The aircraft path is the main folder for the aircraft you wish to evaluate: e.g. (INSTALL_ROOT/share/jsbsim/aircraft/f16)
  • The aircraft name is the name of the aircraft you wish to select. Sometimes there are more than one in each aircraft folder (e.g. f16)
  • Select the engine folder. If the engine for the aircraft is located in the main JSBSim directory (INSTALL_ROOT/share/jsbsim/engine), select that folder. It is also possible that the aircraft can use an engine located in its aircraft directory e.g. (INSTALL_ROOT/share/jsbsim/aircraft/f16/engine).
  • Select the systems folder. If the systems for the aircraft are located in the main JSBSim directory (INSTALL_ROOT/share/jsbsim/systems), select that folder. It is also possible that the aircraft can use an systems located in its aircraft directory e.g. (INSTALL_ROOT/share/jsbsim/aircraft/f16/systems).

Selecting Trim Conditions

The trim conditions are the state at which you wish to trim the vehicle. You can set the velocity/altitude, flight path angle to whatever you wish. If you set the yaw rate, you will instruct the aircraft to trim for a coordinated turn.

Initial Guess

The initial guess is your closest guess to the correct answer for the trimmed inputs. If you guess closer, the trim solution will converge faster.

Output

There are both visual and data outputs for the trim/linearization program. The visual outputs primarily help the user to understand the trim results.

OpenSceneGraph Visualization

If enabled during build, there is a built-in visualization of an aircraft. This can be used to see the current trim output visually even for vehicles that are not planes. Pressing the simulate button will allow you to simulate the aircraft to see the success of your trim state.

FlightGear Socket

You can set the udp port and host for your FlightGear program and the packets will allow you to see the trimming of the aircraft in FlightGear. Note that is necessary to configure FlightGear to accept externalfdm packets. The script located in INSTALL_ROOT/shared/jsbsim/scripts/fgrunExt.sh is useful for this purpose.

Saving Linearization and Trim Files

To save your trim/linearization for an aircraft, press Save. You may set the case name and output directroy in the output tab.