JSBSim in Flight Gear #658
Replies: 8 comments 13 replies
-
Any reason you've asked pretty much the same question twice in two separate issues, this issue and issue https://github.com/JSBSim-Team/jsbsim/discussions/657 ? |
Beta Was this translation helpful? Give feedback.
-
Yes you can script maneuvers in a script file and in general JSBSim output can be sent to FlightGear via an |
Beta Was this translation helpful? Give feedback.
-
There is a detailed tutorial in our FAQ. Please follow the steps carefully, especially when asked to provide some options to the command line such as If this example does not work correctly on your PC then please provide details about what is going wrong ; "it didnt work" is not very helpful. |
Beta Was this translation helpful? Give feedback.
-
I posted some python based code examples in this disucssion - #519 |
Beta Was this translation helpful? Give feedback.
-
You have all the information at hand, just add this jsbsim/data_output/flightgear.xml Lines 18 to 19 in 375f5be |
Beta Was this translation helpful? Give feedback.
-
If you do something that doesn't work please show exactly what you did and/or the output. For example, here is an example (albeit commented out) of an jsbsim/aircraft/c172p/c172p.xml Lines 916 to 941 in 33735db Unless you Which does bring up the point with regards to for t in np.arange(0,20,dt):
fdm.run() This is going to run as fast as your PC can run it, i.e. much faster than real-time, so who knows maybe it transmitted all 20*dt frames to FlightGear in less than a second and you didn't even notice the changes in FlightGear. |
Beta Was this translation helpful? Give feedback.
-
Can you add a snippet of the xml to show exactly where and what you added to the aircraft's xml file? What happens if you add an |
Beta Was this translation helpful? Give feedback.
-
@matheusdarocha If you drive FlightGear from a Python script, you'll most likely notice that your aircraft flies much too fast. This is because JSBSim runs its computation as fast as possible i.e. much faster than real time. If you want your simulation to run in real time, you'll need to wait that enough real time has elapsed since the last simulated time step. One means to achieve this result is the code below (the real time management is below the Lines 126 to 139 in a119eb2 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I would like to ask if there is a way to insert a JSBSim maneuver in Flight Gear, for example:
event name="Trim with elevator"
condition> simulation/sim-time-sec ge 0.71 </condition
set name="ic/targetNlf" value="2.5"/
set name="simulation/do_simple_trim" value="3"/
notify/
/event
The goal is to see the aircraft doing this maneuver
Is that possible?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions