Replies: 8 comments 8 replies
-
Hello, I am the writer. In the comment by 'bcoconni'on Nov 1, 2019 In this point, there must be some parameter lists which can be get or set by these command. I am wondering this parameter lists and the exact variable names to access in the code. |
Beta Was this translation helpful? Give feedback.
-
Hello @GloryENG , I'm not sure what your goal is here. Is it like QtJSBSim? https://sourceforge.net/projects/qtjsbsim/. QtJSBSim shows how to set up bidirectional communication with an instance of JSBSim Standalone app using UDP sockets. |
Beta Was this translation helpful? Give feedback.
-
@GloryENG if you want to implement a completely generic flight simulator then your best bet is probably to take a look at the FlightGear source code to see how they interface to JSBSim. I've implemented a custom flight simulator using JSBSim, where I use Prepar3D to generate the external view across 3 LCDs/projectors and so I've written a small amount of glue code in In my case I'm not trying to support any and all aircraft so I only support a fixed/known set of inceptors and only landing gear position and flap position. See this comment for an example code snippet - #773 (comment) In general JSBSim has a property tree where some items are read-only and some items are readable and writeable. Some of these properties also have explicit class methods e.g. |
Beta Was this translation helpful? Give feedback.
-
Via the property tree manager, e.g. see some code snippets in this comment showing the use of the property manager - #627 (comment) But yes in general you need some mapping between the user's inputs, e.g. hitting the And handling differences e.g. between piston aircraft which include say a fuel mixture control and turbine aircraft which don't, the number of engines etc. If you want users to be able to drop-in/select pretty much any JSBSim FDM as opposed to you only providing a handful that you can setup and control then I suggest you take a look at how FlightGear manage this. |
Beta Was this translation helpful? Give feedback.
-
Thanks so so much @seanmcleod @dpculp I think I should take a look and study "FlightGear.cxx" you mean, the easiest way to communicate or interface between out-running simulator and JSBsim is look and modify FlightGear.cxx, right? Is there any other things good to know for my case? Furthermore, I do surely and clearly find and check the accessible properties, parameters that user can get and set during JSBSim simulation. How do I do? |
Beta Was this translation helpful? Give feedback.
-
I'm not actually familiar with FlightGear's source code, my suggestion to look at how FlightGear does things was based on the fact that you want to be able to handle any JSBSim aircraft model in your sim and that's what FlightGear does. So take a look at how they handle things in terms of different engine types, different number of engines, different sets of controls etc. The |
Beta Was this translation helpful? Give feedback.
-
Hi, did you figure out a way for this? To use JSBSim output to visualize 3d rendering in unity? |
Beta Was this translation helpful? Give feedback.
-
I too am interested in using JSBSim in Unity for flight dynamics. Has anyone achieved this? |
Beta Was this translation helpful? Give feedback.
-
Dear reader and developter...
In advance, thanks for the developers about giving this precious simulation evironments.
Thesedays, I have tried to make interface between JSBSim and outside simulator, replacing flightgear.
the 'outside simulator' is that something like flighgear or UE5, but not excatly. I am going to design some simple flight simulator using Unity.
In this point, the code for interfacing between JSBSim and Unity simulator is required.
First, where can I find the list of parameters that simulator user can input to simulator, and can get output from the simulator?
As you know, there are variety of user inputs not only throttle, roll, yaw, pitch, but also landing gear retraction, flap...like pilot can control in the cockpit pannel.....Also, I know that the user can control some kinds of weather effects....
Where can i find these kinds of user controlable parameters to send and interface with JSBSIM?
In the same way, JSBSim generates lots of parameters not only flight states but also variety of simulation results. How can i check the list of simulation output parameter lists?
Next, if i could define the input and output (O/I) parameters for simulation, How can i get and set these paremeters to JSBSim from outside software(standalone). I saw 'copy_to_JSBSim() and copy_from_JSBSim() in the Flightgear.cxx code, but I don't have definite idea how to control the parameters inside JSBSim using these command...
Actually, I am not English native speaker, so my questions could be awkward, but your kind answer will be so much helpful to me.
Thanks in advance.
@bcoconni
Beta Was this translation helpful? Give feedback.
All reactions