open-dis / open-dis-cpp

C++ implementation of the IEEE-1278.1 Distributed Interactive Simulation (DIS) application protocol v6 and v7
BSD 2-Clause "Simplified" License
90 stars 65 forks source link

ElectromagneticEmissionsPdu is modified according to the document for DIS 7 #62

Closed semihkurt closed 3 years ago

semihkurt commented 3 years ago

I've modified ElectromagneticEmissionsPdu and added two new classes on DIS 7 named as EmissionSystem and EEBeamData according to

EmissionSystem Record on NPS , ElectromagneticEmissionsPdu on NPS clearly shows that after padding attribute there should be EmissionSystem class that holds number of beams, emitter system, location, beams data vector and etc. , DIS v6 vs v7

What is updated:

We need to have EmissionSystem class on both DIS 6 and DIS 7. This pull request covers only for DIS 7. I believe Developers may use the latest version of DIS as I do.

semihkurt commented 3 years ago

I've modified std::vector<EmissionSystem> as std::vector<ElectromagneticEmissionSystemData> as it is in DIS 6. I've modified std::vector<EEBeamData> as std::vector<ElectromagneticEmissionBeamData> as it is in DIS 6. It's now more alike with DIS 6 and people whom migrates from DIS 6 to DIS 7 may have no compile error. now.

leif81 commented 3 years ago

Thank-you @semihkurt , good change. A similar change was made to open-dis-java to add an ElectromagneticEmissionBeamData (https://github.com/open-dis/open-dis-java/pull/76). It makes sense that the same change is applied to open-dis-cpp library. On Java side it's called "EmissionsSystem" btw. Some of this history predates me, but how you've named it to be consistent with the cpp DIS 6 implementation makes sense to me.

On a tangent, I've always thought about making a master spreadsheet of the significant language fixes to open-dis and check them off as we address them in each language implementation (java, cpp, javascript, python, C#). Now that'd be pragmatic! One day...

semihkurt commented 3 years ago

Hello Leif,

Thank you too.

Yes, I wasn't sure about whether I should use short name like EmissionSystem or long name to sustain consistency with DIS 6 by using ElectromagneticEmissionSystemData which is too long :)

Master spreadsheet is a good idea , hope to see it :)