-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically set Electronic Emission Beam Data and System Data length (DIS 6) #114
Automatically set Electronic Emission Beam Data and System Data length (DIS 6) #114
Conversation
…h' into electronic_emission_lenghts_patch
src/main/java/edu/nps/moves/dis/ElectronicEmissionBeamData.java
Outdated
Show resolved
Hide resolved
src/main/java/edu/nps/moves/dis/ElectronicEmissionSystemData.java
Outdated
Show resolved
Hide resolved
public short getSystemDataLength() { | ||
return systemDataLength; | ||
} | ||
|
||
private short calculateSystemDataLength() { | ||
//systemdata length = 13*beamCount + SUM(beamsCount)2*track/jamTargets | ||
short size = 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the size = 5 represent here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 5 represents 32-bit words for the fields in the pdu shown in figure below, and is a part of the System Data Length.
System Data Length. This field shall specify the length of this emitter system’s data (including
beam data and its track/jam information) in 32-bit words. The length shall include the System
Data Length field. This field shall be represented by an 8-bit unsigned integer.
Thanks @fo-ifad ! |
The "Beam Data Length" field, for Elecromagnetic Emission PDU, in "IEEE Std 1278.1-1995(R2002)" section 5.3.7.1- > e.1, is defined as :
Beam Data Length. This field shall specify the length of this beam’s data (including track/
jam information) in 32-bit words. The length shall include the Beam Data Length field,
and shall be represented by an 8-bit unsigned integer.
This field is set manually by the user of open-dis-java, but could be set automatically with the formula `((2 * getTrackJamTargets().size()) + 13)
`
The fields are shown in the attached image, and these are grouped in 32-bit words, so that the number of words become apparent.