Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

JSBSim Systems

From FlightGear wiki
Jump to: navigation, search

A JSBSim System is a chain of components usually within a separate XML file referenced from the main file. The system is a chain of individual control components. A suite of configurable components is available in JSBSim that includes gains, filters, switches, etc. An aircraft system is specified as a string of components within the <channel> element of a <system>, <autopilot>, or <flight_control> specification in the aircraft configuration file. Groupings of components which perform a related task are placed in a <channel> element. See "3.1.9 Systems, Autopilot, and Flight Control" in the JSBSim reference manual.

Overview

A system is defined by convention in Systems/system-name.xml. To include the system in the main JSBSim file use <system file="system-name"/>

Creating a JSBSim system

The Systems/system-name.xml file follows the structure:

  • <?xml version="1.0"?>
    • <system name="SystemName">
    • <property value="xx">systems/name/property</property>
      • <channel name="channel-name"> definitions </channel>
      • <channel name="channel-name"> definitions </channel>
    • </system>

There can be only one system per file, with many channels. Any properties that need to be added (such as definitions, inputs) sit between the system and the channel definition.

System Definition Tag

There can be only one system per file. It requires simply the name of the system.

Properties

The properties defined in a system are usually constants or new input properties that need to be controlled.

Channel

The channel tag defines the name, an optional active (on/off) flag and the rate at which the system should execute.

  • Name
  • Active
  • Execrate

name

The channel name. Generally best to make this unique and meaningful. Specified via name="" tag.

active (execute)

A property that defines 1 or 0 indicating whether a channel is active (whether to be executed or not). execute="property/name"

execrate

Specified via execrate="intvalue" and defines the rate (or more accurately frame skip) for the system. Less critical systems can be run at a slower rate to conserve resources. Most dynamics modules cannot be run at a slower rate, although inputs to dynamics modules can be.

For example a value of 4 will result in the channel within the system being executed every 4th frame (quarter rate). A value of zero or 1 is the same as omitting the execrate element, and results in the channel running at full rate.

Note: This feature is new as of version 2016.2 of Flightgear.

execrate and dt

When channels are running slower than full rate the value of dt in simulation/dt is not the correct value for the channel. When dt is neeed for the channel the property simulation/channel-dt should be used instead.

Related content