DIS output #576
Replies: 3 comments 2 replies
-
Don't quite follow what you're trying to say. Are you saying you've looked at the DIS standard, IEEE 1278 and written your own library to implement at least the portion that deals without outputting position and orientation? Or do you mean you've 'implemented' some other existing DIS open source library - https://sourceforge.net/p/kdis/wiki/Main_Page/ by compiling it locally and linking it in? Or maybe both and @UcfAerokid == Karl Jones (https://sourceforge.net/u/karljj1/profile/)? |
Beta Was this translation helpful? Give feedback.
-
Another observation is that it also outputs at every trim step, which is undesired behavior. Will have to find the right triggers to skip the output step if the sim is trimming. |
Beta Was this translation helpful? Give feedback.
-
jsbsim/src/models/flight_control/FGActuator.cpp Lines 144 to 148 in d53cb46 |
Beta Was this translation helpful? Give feedback.
-
I've implemented the KDIS Open Source library to add DIS (IEEE Std 1278.1A-1998) output from JSBSim for visualization and enable participation in distributed simulation events. It's a very basic implementation of position and orientation, with body frame-referenced dead reckoning to enable smooth representation while keeping DIS traffic to a minimum.
The XML output element is shown below:
<output type="DIS" name="127.0.0.1" port="61211" entityId="1:3:5" rate="5" deadReckoning="on" exerciseId="3" entityType="1:2:225:1:2:3:0"> </output>
The entity type is derived from the standard's enumerations document (SISO-REF-010-XXXX, Enumeration and Bit Encoded Values for Use with Protocols for Distributed Interactive Simulation Applications). The Entity ID and exercise ID are necessary to identify the simulation entity within the applicable simulation exercise event.
See attached .zip file for relevant source of derived output type class and a Wireshark PCAP of the resulting output a the specified 5Hz rate with dead reckoning implemented.
Of course, the src/models/FgOutput.cpp has to have the type implemented in FGOutput::Load()
else if (type == "DIS") { Output = new FGOutputDisSocket(FDMExec);
I have some TODO's in the source .cpp file. The most important would be an array of elements to map DIS articulation indices to JSBSim properties so that model can show control surface deflections, etc. Also appearance bits to reflect nav/strobe lights on/off status, etc.
My JSBSim VS Solution links to my KDIS tree, which can link in static or DLL lib, but I'm not sure how the maintainers would approach implementing other open sources.
Welcome any feedback and questions.
jsbsimDisOut.zip
Beta Was this translation helpful? Give feedback.
All reactions