Replies: 2 comments 7 replies
-
First off, you don't get to set the Rather what your script, or python code gets to do is set the control positions, i.e. the angle for elevators, ailerons, rudders, throttle, i.e. as if your script was a physical pilot moving the controls. The resulting position of these control surfaces are then used by JSBSim to calculate the forces and moments and using the equations of motion etc. to then calculate the aircraft's pose for each simulation time step. The But often the channel setups will be a lot more complicated, e.g. often at a minimum adding up a trim command plus a stick command. Typically a reinforcement learning system will basically input what the pilot would've via the control inputs. |
Beta Was this translation helpful? Give feedback.
-
There are a number of properties that are created by JSBSim and exported, some are read-only and some are read and writeable. They are exported by the various models, for example here is the list exported by jsbsim/src/models/FGPropulsion.cpp Lines 793 to 816 in 6461c86 If I come across a property that is referenced in a script etc. that I want more information on I generally search the source code, like I just did for In terms of property info etc. also take a look at this discussion - #403 It also mentions some reinforcement learning stuff with regards to JSBSim. In terms of getting a comprehensive list also take a look at the (base) C:\source\jsbsim>.\Debug\JSBSim.exe --aircraft=737 --catalog
JSBSim Flight Dynamics Model v1.0.0 Feb 2 2022 20:29:28
[JSBSim-ML v2.0]
JSBSim startup beginning ...
In file aircraft/737/737.xml: line 901
Property fcs/aileron-cmd-norm is already defined.
In file aircraft/737/737.xml: line 902
Property fcs/elevator-cmd-norm is already defined.
In file aircraft/737/737.xml: line 903
Property fcs/rudder-cmd-norm is already defined.
In file aircraft/737/737.xml: line 904
Property fcs/throttle-cmd-norm[0] is already defined.
In file aircraft/737/737.xml: line 905
Property fcs/throttle-cmd-norm[1] is already defined.
In file aircraft/737/737.xml: line 906
Property simulation/terminate is already defined.
Property Catalog for 737
inertial/sea-level-radius_ft (R)
simulation/gravity-model (RW)
simulation/integrator/rate/rotational (RW)
simulation/integrator/rate/translational (RW)
simulation/integrator/position/rotational (RW)
simulation/integrator/position/translational (RW)
simulation/write-state-file (W)
simulation/channel-dt (R)
simulation/gravitational-torque (RW)
simulation/force-output (W)
simulation/do_simple_trim (W)
simulation/reset (W)
simulation/disperse (R)
simulation/randomseed (RW)
simulation/terminate (RW)
simulation/pause (RW)
simulation/sim-time-sec (R)
simulation/dt (R)
simulation/jsbsim-debug (RW)
simulation/frame (RW)
simulation/trim-completed (RW)
simulation/frame_start_time (RW)
simulation/cycle_duration (RW)
simulation/output/log_rate_hz (RW)
simulation/output/enabled (RW)
velocities/h-dot-fps (R)
velocities/v-north-fps (R)
velocities/v-east-fps (R)
velocities/v-down-fps (R)
velocities/u-fps (R)
velocities/v-fps (R)
velocities/w-fps (R)
velocities/p-rad_sec (R)
velocities/q-rad_sec (R)
velocities/r-rad_sec (R)
velocities/pi-rad_sec (R)
velocities/qi-rad_sec (R)
velocities/ri-rad_sec (R)
velocities/eci-x-fps (R)
velocities/eci-y-fps (R)
velocities/eci-z-fps (R)
velocities/eci-velocity-mag-fps (R)
velocities/ned-velocity-mag-fps (R)
velocities/vc-fps (R)
velocities/vc-kts (R)
velocities/ve-fps (R)
velocities/ve-kts (R)
velocities/vtrue-fps (R)
velocities/vtrue-kts (R)
velocities/machU (R)
velocities/p-aero-rad_sec (R)
velocities/q-aero-rad_sec (R)
velocities/r-aero-rad_sec (R)
velocities/phidot-rad_sec (R)
velocities/thetadot-rad_sec (R)
velocities/psidot-rad_sec (R)
velocities/u-aero-fps (R)
velocities/v-aero-fps (R)
velocities/w-aero-fps (R)
velocities/vt-fps (R)
velocities/mach (R)
velocities/vg-fps (R)
position/h-sl-ft (RW)
position/h-sl-meters (RW)
position/lat-gc-rad (RW)
position/long-gc-rad (RW)
position/lat-gc-deg (RW)
position/long-gc-deg (RW)
position/lat-geod-rad (R)
position/lat-geod-deg (R)
position/geod-alt-ft (R)
position/h-agl-ft (RW)
position/geod-alt-km (R)
position/h-agl-km (RW)
position/radius-to-vehicle-ft (R)
position/terrain-elevation-asl-ft (RW)
position/eci-x-ft (R)
position/eci-y-ft (R)
position/eci-z-ft (R)
position/ecef-x-ft (R)
position/ecef-y-ft (R)
position/ecef-z-ft (R)
position/epa-rad (R)
position/distance-from-start-lon-mt (R)
position/distance-from-start-lat-mt (R)
position/distance-from-start-mag-mt (R)
position/vrp-gc-latitude_deg (R)
position/vrp-longitude_deg (R)
position/vrp-radius-ft (R)
metrics/terrain-radius (R)
metrics/Sw-sqft (RW)
metrics/bw-ft (R)
metrics/cbarw-ft (R)
metrics/iw-rad (R)
metrics/iw-deg (R)
metrics/Sh-sqft (R)
metrics/lh-ft (R)
metrics/Sv-sqft (R)
metrics/lv-ft (R)
metrics/lh-norm (R)
metrics/lv-norm (R)
metrics/vbarh-norm (R)
metrics/vbarv-norm (R)
metrics/aero-rp-x-in (RW)
metrics/aero-rp-y-in (RW)
metrics/aero-rp-z-in (RW)
metrics/eyepoint-x-in (R)
metrics/eyepoint-y-in (R)
metrics/eyepoint-z-in (R)
metrics/visualrefpoint-x-in (R)
metrics/visualrefpoint-y-in (R)
metrics/visualrefpoint-z-in (R)
attitude/phi-rad (R)
attitude/theta-rad (R)
attitude/psi-rad (R)
attitude/phi-deg (R)
attitude/theta-deg (R)
attitude/psi-deg (R)
attitude/roll-rad (R)
attitude/pitch-rad (R)
attitude/heading-true-rad (R)
orbital/specific-angular-momentum-ft2_sec (RW)
orbital/inclination-deg (RW)
orbital/right-ascension-deg (RW)
orbital/eccentricity (RW)
orbital/argument-of-perigee-deg (RW)
orbital/true-anomaly-deg (RW)
orbital/apoapsis-radius-ft (RW)
orbital/periapsis-radius-ft (RW)
orbital/period-sec (RW)
atmosphere/T-R (R)
atmosphere/rho-slugs_ft3 (R)
atmosphere/P-psf (R)
atmosphere/a-fps (R)
atmosphere/T-sl-R (R)
atmosphere/rho-sl-slugs_ft3 (R)
atmosphere/a-sl-fps (R)
atmosphere/theta (R)
atmosphere/sigma (R)
atmosphere/delta (R)
atmosphere/a-ratio (R)
atmosphere/density-altitude (R)
atmosphere/pressure-altitude (R)
atmosphere/delta-T (RW)
atmosphere/SL-graded-delta-T (RW)
atmosphere/P-sl-psf (RW)
atmosphere/dew-point-R (RW)
atmosphere/vapor-pressure-psf (RW)
atmosphere/saturated-vapor-pressure-psf (R)
atmosphere/RH (RW)
atmosphere/vapor-fraction-ppm (RW)
atmosphere/psiw-rad (RW)
atmosphere/wind-north-fps (RW)
atmosphere/wind-east-fps (RW)
atmosphere/wind-down-fps (RW)
atmosphere/wind-mag-fps (RW)
atmosphere/gust-north-fps (RW)
atmosphere/gust-east-fps (RW)
atmosphere/gust-down-fps (RW)
atmosphere/cosine-gust/startup-duration-sec (W)
atmosphere/cosine-gust/steady-duration-sec (W)
atmosphere/cosine-gust/end-duration-sec (W)
atmosphere/cosine-gust/magnitude-ft_sec (W)
atmosphere/cosine-gust/frame (W)
atmosphere/cosine-gust/X-velocity-ft_sec (W)
atmosphere/cosine-gust/Y-velocity-ft_sec (W)
atmosphere/cosine-gust/Z-velocity-ft_sec (W)
atmosphere/cosine-gust/start (W)
atmosphere/updownburst/number-of-cells (W)
atmosphere/turb-north-fps (RW)
atmosphere/turb-east-fps (RW)
atmosphere/turb-down-fps (RW)
atmosphere/p-turb-rad_sec (R)
atmosphere/q-turb-rad_sec (R)
atmosphere/r-turb-rad_sec (R)
atmosphere/turb-type (RW)
atmosphere/turb-rate (RW)
atmosphere/turb-gain (RW)
atmosphere/turb-rhythmicity (RW)
atmosphere/turbulence/milspec/windspeed_at_20ft_AGL-fps (RW)
atmosphere/turbulence/milspec/severity (RW)
atmosphere/total-wind-north-fps (R)
atmosphere/total-wind-east-fps (R)
atmosphere/total-wind-down-fps (R)
fcs/aileron-cmd-norm (RW)
fcs/elevator-cmd-norm (RW)
fcs/rudder-cmd-norm (RW)
fcs/flap-cmd-norm (RW)
fcs/speedbrake-cmd-norm (RW)
fcs/spoiler-cmd-norm (RW)
fcs/pitch-trim-cmd-norm (RW)
fcs/roll-trim-cmd-norm (RW)
fcs/yaw-trim-cmd-norm (RW)
fcs/left-aileron-pos-rad (RW)
fcs/left-aileron-pos-deg (RW)
fcs/left-aileron-pos-norm (RW)
fcs/mag-left-aileron-pos-rad (R)
fcs/right-aileron-pos-rad (RW)
fcs/right-aileron-pos-deg (RW)
fcs/right-aileron-pos-norm (RW)
fcs/mag-right-aileron-pos-rad (R)
fcs/elevator-pos-rad (RW)
fcs/elevator-pos-deg (RW)
fcs/elevator-pos-norm (RW)
fcs/mag-elevator-pos-rad (R)
fcs/rudder-pos-rad (RW)
fcs/rudder-pos-deg (RW)
fcs/rudder-pos-norm (RW)
fcs/mag-rudder-pos-rad (R)
fcs/flap-pos-rad (RW)
fcs/flap-pos-deg (RW)
fcs/flap-pos-norm (RW)
fcs/speedbrake-pos-rad (RW)
fcs/speedbrake-pos-deg (RW)
fcs/speedbrake-pos-norm (RW)
fcs/mag-speedbrake-pos-rad (R)
fcs/spoiler-pos-rad (RW)
fcs/spoiler-pos-deg (RW)
fcs/spoiler-pos-norm (RW)
fcs/mag-spoiler-pos-rad (R)
fcs/left-brake-cmd-norm (RW)
fcs/right-brake-cmd-norm (RW)
fcs/center-brake-cmd-norm (RW)
fcs/wing-fold-pos-norm (RW)
fcs/steer-cmd-norm (RW)
fcs/steer-pos-deg (RW)
fcs/throttle-cmd-norm (RW)
fcs/throttle-pos-norm (RW)
fcs/mixture-cmd-norm (RW)
fcs/mixture-pos-norm (RW)
fcs/advance-cmd-norm (RW)
fcs/advance-pos-norm (RW)
fcs/feather-cmd-norm (RW)
fcs/feather-pos-norm (RW)
fcs/throttle-cmd-norm[1] (RW)
fcs/throttle-pos-norm[1] (RW)
fcs/mixture-cmd-norm[1] (RW)
fcs/mixture-pos-norm[1] (RW)
fcs/advance-cmd-norm[1] (RW)
fcs/advance-pos-norm[1] (RW)
fcs/feather-cmd-norm[1] (RW)
fcs/feather-pos-norm[1] (RW)
fcs/pitch-trim-sum (RW)
fcs/elevator-control (RW)
......... |
Beta Was this translation helpful? Give feedback.
-
Hello everybody,
I am new to JSBSim and intend to use it in an application based on reinforcement learning.
I have some troubles getting start with JSBSim and here are my questions:
I read section 2.4 of JSBSim Reference Manual – Properties and JSBSim Script Tutorial 1, and yet I don’t understand what exactly properties are. In the case below (which is from page 13):
Could the name of
fcs/pitch-trim-cmd-norm
be changed to anything else, and if it couldn't, where can I get the list of "known static properties";Where can the “Pitch” channel be called when I want to adjust the aircraft’s pose in the script? Should I write something like codes below? What's the meaning of
name
inset
and does it lead to other component in the project? And I also want to know where I can learn specific writing rules of scripts.My mother tongue is not English and I'd never started a discussion on github before, thus if there is any offence or representation unclear, please let me know. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions