JSON output for real time strip chart plotting #580
Replies: 5 comments
-
@UcfAerokid thanks, the json output for PlotJuggler has been on my todo list for ages 😉 But yes you'll need to get up to speed with git though to enable other JSBSim developers to be able to easily review your code via a github pull request. Here is a very simple step by step guide on how to go about submitting a pull request, starting with forking the JSBSim repo, creating a branch etc. https://jarv.is/notes/how-to-pull-request-fork-github/ P.S |
Beta Was this translation helpful? Give feedback.
-
Just looking at your sample So at the moment the Current situation. <output name="JSBout172C.csv" type="CSV" rate="60">
<output name="localhost" type="SOCKET" port="5138" protocol="UDP" rate="10">
<output name="localhost" type="JSON" port="49870" rate="10">
|
Beta Was this translation helpful? Give feedback.
-
So potentially something along these lines? The We'd need some backwards compatibility, so if Actually @dpculp's QTJSBSim introduced another |
Beta Was this translation helpful? Give feedback.
-
@UcfAerokid Nice ! A pull request for this feature will be most appreciated as @seanmcleod said. |
Beta Was this translation helpful? Give feedback.
-
OK @bcoconni @seanmcleod . If I got this Git thing right there should be an active branch available to pull from. Please let me know if you see it and it's useful, or any feedback on the code, etc. I've used Visual SourceSafe, SubVersion, Mercurial, Razor etc. throughout my career, but it's my first time dipping my toes into Git, so please let me know if I need to do something different. I followed your link with the suggested procedures as best as I could from my GitHub app. Thanks. |
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.
-
jsbsimJsonOut.zip
I was able to get JSON format output working to feed the PlotJuggler live plotting utility. It outputs JSON strings to a socket where PlotJuggler can pick up the object format and parse the object tree to run realtime strip charts (see screen cap attached).
I used the FgOutputSocket.cpp/h as a starting point and it reads the output element as seen below:
etc...
I don't have the individual properties working just yet, but that will be the next step when I get another chance to work on it again. They will be appended at the end after all the sections that are turned ON have been included.
The .zip also has the Wireshark capture showing the strings. Select decode as JSON and WS will display the JSON object tree.
Any feedback or ideas greatly appreciated. I don't have it all working and I'm a Git newb, so I'm not sure how to submit the code, but it's in the .zip file for your consideration.
Thanks @seanmcleod for pointing me in the direction of PlotJuggler.
Beta Was this translation helpful? Give feedback.
All reactions