Skip to content
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

Merged
merged 7 commits into from
Jun 21, 2023

Conversation

fo-ifad
Copy link
Contributor

@fo-ifad fo-ifad commented Jun 19, 2023

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.

beamDataLength

@leif81 leif81 changed the title Electronic emission lenghts patch Automatically set Electronic Emission PDU length (DIS 6) Jun 20, 2023
@leif81 leif81 changed the title Automatically set Electronic Emission PDU length (DIS 6) Automatically set Electronic Emission Beam Data length (DIS 6) Jun 20, 2023
@leif81 leif81 changed the title Automatically set Electronic Emission Beam Data length (DIS 6) Automatically set Electronic Emission Beam Data and System Data length (DIS 6) Jun 20, 2023
public short getSystemDataLength() {
return systemDataLength;
}

private short calculateSystemDataLength() {
//systemdata length = 13*beamCount + SUM(beamsCount)2*track/jamTargets
short size = 5;
Copy link
Member

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?

Copy link
Contributor Author

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.

system_data_length

@leif81 leif81 merged commit f7d2c0f into open-dis:master Jun 21, 2023
@leif81
Copy link
Member

leif81 commented Jun 21, 2023

Thanks @fo-ifad !

@fo-ifad fo-ifad deleted the electronic_emission_lenghts_patch branch February 22, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants