From: Jon S. B. <jon...@co...> - 2009-07-01 13:06:57
|
I have placed online at the JSBSim.org web site a rudimentary stripchart application: http://www.jsbsim.org/stripchart.zip If you unzip this into a folder, it should result in an application that you can run which will just sit there and wait. If you select File|Options, you can select a different port number to listen at (the default is 1138). When you are ready, you can click on the Start button and the application will begin waiting. The idea is then to start JSBSim, running an aircraft model that has an <output> spec that looks like this: <output name="localhost" type="SOCKET" port="1138" rate="20"> <simulation> OFF </simulation> <atmosphere> OFF </atmosphere> <massprops> OFF</massprops> <rates> OFF </rates> <velocities> OFF </velocities> <forces> OFF </forces> <moments> OFF </moments> <position> OFF </position> <propulsion> OFF </propulsion> <aerosurfaces> OFF </aerosurfaces> <fcs> OFF </fcs> <ground_reactions> OFF </ground_reactions> <coefficients> OFF </coefficients> <property> position/h-agl-ft </property> <property> velocities/vc-kts </property> <property> attitude/phi-rad </property> <property> fcs/attitude/sensor/phi-rad </property> </output> Notice the name, type, port, and rate settings. When JSBSim is run with this <output> definition (or when standalone JSBSim is run where the "--logdirectivefile" is used to provide an <output> directives file name) then data is sent out over a socket (in this case on locahost | port 1138) and the stripchart application sees that and begins plotting it. Of course, this works best when JSBSim is run in realtime mode (either from the standalone application, or when JSBSim is incorporated into another application). I run JSBSim like this when using the stripchart, src/jsbsim --script=scripts/c1723 --realtime --nice The shutdown of both JSBSim and the stripchart application is not very graceful at this time, unfortunately. I wrote this application quite a while ago, when I was not as familiar with sockets as I am now (and I'm still not very familiar with them). I hope this is useful for someone. Let me know if there are any problems. I may have forgotten to include a DLL in the zipfile. Jon Jon S. Berndt Development Coordinator JSBSim Project www.JSBSim.org |