Hi there,
I'm pretty new to C++ coding and JSBSim, but I'm looking to try and use JSBSim in a project.
My plan is to get JSBSim to re-read the aircraft model file (or just the relevant properties) when given a signal to poll, while running. The aim of this is to allow an external programme to push new data to JSBSim on the fly while it powers FlightGear, so that an easy user interface can be written for people to play around with different aircraft parameters?
Should I just write my own super simplified FDM (which could make it easy to change different aircraft paramters) in MATLAB (and compile to C) and use that power FlightGear to save myself the hassle? Are there any existing FDMs that are both powerful like JSBSim that'd be easier for this? Or should I stick with working with JSBSim and can you help? (I didn't have too much trouble getting it compile, but as soon as I tried to simply get it reload an aircraft file after initialising while running in realtime mode, I got stuck).
Thank you in advance!!!
Ben
Quick update:
I figured it out :) my JSBSim now reads the aircraft model file again on demand when I change a "flush" file in the aircraft directory that it reads on each iteration from containing "0" to "1". It then changes it back to a "0" once it's refreshed.
I don't know if this is useful to others and should be commit to main the codebase - I'd have thought others may want a more robust way to implement this - for me - I like that the trigger is outside of the FDM socket to FlightGear because it makes it easy for me to use an external piece of software altogether to write to the aircraft file and then update this file and have everything refresh automagically.
Hi Ben. I am new to software developement. I am doing a simulator project. I need to extract only few required data and send it to display using sockets at a certain interval(0.02 seconds). I am facing same problem. Can Any One Please guide.
Hi Piyush,
Check out this:
https://bitbucket.org/ukblewis/flightgear/commits/ece3be8ed6699cb63fb501de65a262f3854063f4
I forked the FlightGear repository to try and implement this feature in
JSBSim. It appeared to work, but I was only doing it file-wide, i.e. the
trigger of the "1" in the flush file causes JSBSim to reload the entire
model data.
Best of luck!
Warmest regards,
Ben
On Sat, 15 Oct 2016 at 13:43 PIYUSH RAJ piyushme19@users.sf.net wrote:
Ticket moved from /p/jsbsim/feature-requests/94/