JSBSim properties - Outerra/anteworld GitHub Wiki
Usage
JSBSim properties can be used in script, by using following codes, based on scripting language.
Replace property with JSBSim properties listed bellow and value with the desired value.
//cpp
//Get JSBSim interface
this->jsbsim = jsb();
//Get property
this->jsbsim->operator()("property")
//Set property
this->jsbsim->operator()("property", value);
//JS
//Get JSBSim interface
this.jsbsim = this.jsb();
//Get property
this.jsbsim['property'];
//Set property
this.jsbsim['property'] = value;
//Lua
//Get JSBSim interface
self.jsbsim = self:jsb();
//Get property
self.jsbsim:get_property('property')
//Set property
self.jsbsim:set_property('property', value);
Warning: Not all properties, listed in the JSBSim reference manual, work in Outerra. Following JSBSim properties were tested and should be working.
Note: The JSBSim structure property tree commonly includes a "root-node", "sub-nodes" (like subdirectories) and "end-nodes" (properties).
Properties
Propulsion
/engine[0] - First engine. Replace "0" with desired engine number.
/tank[0] - First fuel tank. Replace "0" with desired fuel tank number.
Commands needed to start aircraft
Property |
Description |
Type |
propulsion/magneto_cmd |
Command to activate/deactivate magneto |
Setter |
propulsion/starter_cmd |
Command to activate/deactivate starter |
Setter |
General
[x] - engine number
Property |
Description |
Units |
Type |
propulsion/engine[x]/thrust-lbs |
Thrust |
lbs |
Getter |
propulsion/tank[x]/contents-lbs |
Fuel content in selected tank |
lbs |
Getter |
propulsion/total-fuel-lbs |
Total amount of fuel |
lbs |
Getter |
propulsion/tat-r |
Total temperature, isentropic flow |
ºR |
Getter |
propulsion/tat-c |
Total temperature, isentropic flow |
ºC |
Getter |
propulsion/pt-lbs_sqft |
Total pressure |
sqft |
Getter |
propulsion/engine[x]/engine-rpm |
Engine revolutions |
RPM |
Getter |
propulsion/engine[x]/propeller-rpm |
Propeller revolutions |
RPM |
Getter |
propulsion/engine[x]/power-hp |
Engine power |
HP |
Getter |
propulsion/engine[x]/map-pa |
Manifold absolute pressure |
pa |
Getter |
propulsion/engine[x]/map-inhg |
Manifold absolute pressure |
inHg |
Getter |
propulsion/engine[x]/oil-pressure-psi |
Oil pressure |
psi |
Getter |
propulsion/engine[x]/oil-temperature-degF |
Oil temperature |
ºF |
Getter |
propulsion/engine[x]/egt-degF |
Exhaust gas temperature |
ºF |
Getter |
propulsion/engine[x]/cht-degF |
Cylinder head temperature |
ºF |
Getter |
propulsion/engine[x]/fuel_isolation-cock |
Fuel isolation valve |
0/1 |
Setter |
propulsion/engine[x]/boost-pump |
Boost pump |
0/1 |
Setter |
propulsion/priming-cock |
Priming cock |
0/1 |
Setter |
propulsion/engine[x]/rpm_governor-cmd |
RPM governor |
number (e.g. 2500) |
Setter |
propulsion/engine[x]/starter-norm |
Starter command |
0-1 |
Setter |
propulsion/engine[x]/starter-mesh |
Mesh command |
0-1 |
Setter |
propulsion/engine[x]/AFR-cmd |
Air-fuel ratio |
number (e.g. 8-17) |
Setter |
propulsion/engine[x]/cooling-factor |
Cooling factor |
number (e.g. 1.24-2) |
Setter |
Turbine & Turboprop engine specific
Property |
Description |
Units |
Type |
propulsion/engine[0]/n1 |
Nozzle 1 |
- |
Getter |
propulsion/engine[0]/n2 |
Nozzle 2 |
- |
Getter |
Other commands
Property |
Description |
Type |
propulsion/refuel |
Command to refuel (6000 lbs per minute) |
Setter |
propulsion/fuel_dump |
Command to dump fuel from all tanks |
Setter |
Velocities
Property |
Description |
Units |
Type |
velocities/vc-kts |
Airspeed |
kts |
Getter |
velocities/v-down-fps |
Vertical speed |
fps |
Getter |
velocities/p-rad_sec |
Roll speed |
rad/s |
Getter |
velocities/q-rad_sec |
Pitch speed |
rad/s |
Getter |
velocities/r-rad_sec |
Yaw speed |
rad/s |
Getter |
Attitude
Property |
Description |
Units |
Type |
attitude/pitch-rad |
Pitch |
rad |
Getter |
attitude/roll-rad |
Roll |
rad |
Getter |
attitude/heading-true-rad |
True heading |
rad |
Getter |
Position
Property |
Description |
Units |
Type |
position/h-sl-ft |
Altitude above sea level |
ft |
Getter |
position/h-sl-meters |
Altitude above sea level |
m |
Getter |
position/h-agl-ft |
Altitude above ground level |
ft |
Getter |
Gears
**[x]** - gear number
Commands
Property |
Description |
Type |
gear/gear-cmd-norm |
Gear retract/extend command |
Setter |
Positions
Property |
Description |
Units |
Type |
gear/unit[x]/steering-angle-deg |
Angle of the first wheel |
deg |
Getter |
gear/gear-pos-norm |
Gear position (retracted/extended) |
deg |
Getter |
gear/num-units |
Number of gear units ("BOGEY" + "STRUCTURE" types) |
deg |
Getter |
gear/unit[x]/wheel-speed-fps |
Wheel speed |
ft per s |
Getter |
propulsion/engine[x]/power-hp |
Engine power |
hp |
Getter |
FCS
Commands
Property |
Description |
Type |
fcs/steer-cmd-norm |
Steer command |
Setter |
fcs/mixture-cmd-norm |
Mixture command |
Setter |
fcs/throttle-cmd-norm |
Throttle command |
Setter |
fcs/elevator-cmd-norm |
Elevator command |
Setter |
fcs/rudder-cmd-norm |
Rudder command |
Setter |
fcs/aileron-cmd-norm |
Aileron command |
Setter |
fcs/flap-cmd-norm |
Flaps command |
Setter |
fcs/center-brake-cmd-norm |
Center brake command |
Setter |
fcs/left-brake-cmd-norm |
Left brake command |
Setter |
fcs/right-brake-cmd-norm |
Right brake command |
Setter |
fcs/turbo-cmd-norm[x] |
Turbo command (x is number on engine in multi-engine aircraft) |
Setter |
Adding properties to separate engines
You can set property to only one engine, by adding [x] at the end of property name, where "x" is the index of the engine.
Note: for now, it was only tested with mixture and throttle.
Property |
Description |
Type |
fcs/mixture-cmd-norm[0] |
Mixture command for engine with index 0 |
Setter |
fcs/throttle-cmd-norm[0] |
Throttle command for engine with index 0 |
Setter |
Positions
Property |
Description |
Units |
Type |
fcs/throttle-pos-norm |
Throttle position |
norm |
Getter |
fcs/mixture-pos-norm |
Mixture position |
norm |
Getter |
fcs/elevator-pos-norm |
Elevator position |
norm |
Getter |
fcs/elevator-pos-rad |
Elevator position |
rad |
Getter |
fcs/mag-elevator-pos-rad |
Elevator position using magnitude (radian based absolute version) |
+rad |
Getter |
fcs/rudder-pos-norm |
Rudder position |
norm |
Getter |
fcs/rudder-pos-rad |
Rudder position |
rad |
Getter |
fcs/mag-rudder-pos-rad |
Rudder position using magnitude |
+rad |
Getter |
fcs/left-aileron-pos-norm |
Left aileron position |
norm |
Getter |
fcs/left-aileron-pos-rad |
Left aileron position |
rad |
Getter |
fcs/mag-left-aileron-pos-rad |
Left aileron position using magnitude |
+rad |
Getter |
fcs/right-aileron-pos-norm |
Right aileron position |
norm |
Getter |
fcs/right-aileron-pos-rad |
Right aileron position |
rad |
Getter |
fcs/mag-right-aileron-pos-rad |
Right aileron position using magnitude |
+rad |
Getter |
fcs/flap-pos-rad |
Flaps position |
norm |
Getter |
Aero
Property |
Description |
Units |
Type |
aero/alpha-rad |
Angle between X body axis and X wind axis measured on UV plane |
rad |
Getter |
aero/beta-rad |
Angle between X body axis and X wind axis measured on UW plane |
rad |
Getter |
aero/mag-beta-rad |
Angle between X body axis and X wind axis measured on UW plane using magnitude |
+rad |
Getter |
aero/qbar-psf |
Dynamic pressure - product of velocity^2*(air density)/2 |
rad |
Getter |
aero/qbarUV-psf |
Value of QBar restricted to the vertical plane (use for formula involving Alpha) |
rad |
Getter |
aero/qbarUW-psf |
Value of QBar restricted to the horizontal plane (use for formula involving Beta) |
rad |
Getter |
Atmosphere
Property |
Description |
Units |
Type |
atmosphere/P-psf |
Atmospheric pressure |
psf |
Getter |
atmosphere/T-R |
Current modeled temperature |
ºR |
Getter |
atmosphere/rho-slugs_ft3 |
Air density at sea level |
slugs/ft3 |
Getter |
atmosphere/a-fps |
Speed of sound in the current atmospheric conditions |
fps |
Getter |
atmosphere/T-sl-R |
Temperature at sea level |
°R |
Getter |
atmosphere/rho-sl-slugs_ft3 |
Standard air density at sea level |
slugs/ft3 |
Getter |
atmosphere/P-sl-psf |
Standard atmospheric pressure at sea level |
psf |
Getter |
atmosphere/a-sl-fps |
Speed of sound at sea level |
fps |
Getter |
atmosphere/theta |
Temperature ratio (current / sea lvl) |
- |
Getter |
atmosphere/sigma |
Air density ratio (current / sea lvl) |
- |
Getter |
atmosphere/delta |
Pressure ratio (current / sea lvl) |
- |
Getter |
atmosphere/a-ratio |
Speed of sound ratio (current / sea lvl) |
- |
Getter |
Further readings
https://github.com/Outerra/anteworld/wiki/Aircraft