Using JSBSim as an external FDM for DCS #1488
seanmcleod70
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
@Zaretto has a repo - https://github.com/Zaretto/acEFM that allows you to make use of JSBSim FDMs within DCS.
Currently he maintains a personal JSBSim fork with some custom changes as part of acEFM.
A couple of PRs were submitted recently aiming to do away with the need for maintaining a modified JSBSim fork, and to potentially include changes that would be useful for other cases where JSBSim needs to be incorporated into another simulation environment.
There was some discussion in one of the PRs that wasn't entirely focussed on the specific PR and which includes some information others may find useful if they're interested in using JSBSim as an external FDM with DCS or other similar simulation environments, so this separate discussion item has been created to continue the discussion.
I've taken a new look after your tidy up, in particular glancing through these 2 files.
https://github.com/Zaretto/acEFM/blob/master/flyt-EFM-dcsJSBSim/JSBSim_interface.cpp
https://github.com/Zaretto/acEFM/blob/master/flyt-EFM-dcsJSBSim/DCS_interface.cpp
Given your comment about simply needing to disable the integrators in JSBSim, i.e.
I guess my initial thoughts were that the breakdown between DCS and JSBSim was along the lines in the following diagram, with JSBSim's responsibilities in the grey block, and with DCS taking care of the blocks I've circled in pale blue.
However, looking at the code, it isn't the case that DCS simply takes$\dot{X}$ from JSBSim, integrates it and returns $X$ .
Rather, you supply DCS with the total force and total moment (excluding gear) from JSBSim and then DCS uses that, with mass information etc. to run the 6-DOF dynamics, and integrates the result that you then feed back into JSBSim. In other words, the blocks I've highlighted in green are also DCS blocks, including the atmosphere.
You then feed$X$ back into JSBSim via these and a couple of other functions. Although DCS's alpha and beta are ignored.
All reactions