20,741
edits
m (→I/O) |
|||
Line 277: | Line 277: | ||
This tells JSBSim to use port 5600 (via UDP) at a rate of 60 hz to send FDM updates to the corresponding FlightGear instance. | This tells JSBSim to use port 5600 (via UDP) at a rate of 60 hz to send FDM updates to the corresponding FlightGear instance. | ||
Next, to slave FlightGear to JSBSim in standalone mode via port 5600, you would use these additional parameters | Next, to slave FlightGear to JSBSim in standalone mode via port 5600, you would use these additional parameters to disable the built-in FDM and enable native-fdm slaving at a frequency of 60hz, via UDP (localhost). | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
--fdm=null --native-fdm=socket,in,60,,5600,udp | --fdm=null --native-fdm=socket,in,60,,5600,udp | ||
Line 285: | Line 285: | ||
(Type of aircraft doesn't really matter, the FDM output will be applied to any model, no matter if it's a 747, the ufo or the ogeL). | (Type of aircraft doesn't really matter, the FDM output will be applied to any model, no matter if it's a 747, the ufo or the ogeL). | ||
After making these changes, and after starting FlightGear, it's time | After making these changes, and after starting FlightGear, it's time to start JSBSim, too: | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
Line 291: | Line 291: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Typically, you'll however want to use FGScript to create a completely scripted JSBSim run, which allows you to easily test new FDM features (and simulated systems) non-interactively. | Typically, you'll however want to use FGScript to create a completely scripted JSBSim run, which allows you to easily test new FDM features (and simulated systems) non-interactively: | ||
<syntaxhighlight lang="text"> | |||
JSBSim --root=$HOME/sources/jsbsim-code/ --script=c3105 | |||
</syntaxhighlight> | |||
This will run the script in the folder scripts/c3105.xml, which in turn loads the c310 FDM, the initial settings from the ellington.xml file and the autopilot from c310ap.xml | |||
=== FGScript === | === FGScript === |