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

TransmitterPDU data appears to be misinterpreted. #62

Open
HalRules opened this issue Sep 11, 2024 · 1 comment
Open

TransmitterPDU data appears to be misinterpreted. #62

HalRules opened this issue Sep 11, 2024 · 1 comment

Comments

@HalRules
Copy link

I’ve been getting a “Malformed Packet" message from the TransmitterPdu Class that I believe is interpreting the data incorrectly.

The Modulation Parameter length field (as listed in the online DIS Data Dictionary) should represent the SIZE of parameter data and not the parameter COUNT.

Specifically, IEEE 1278.1 states that the field “shall specify the length in octets of the modulation parameters that follow this field”.

This aligns with data that I have been reviewing. While it’s true that modulation parameter fields are supposed to be 2 bytes, it appears as though the data is interpreted differently depending on the modulation type in practice.

I’ve seen no data that includes Antenna Parameters, but it appears to me as though the Antenna Pattern Length Field should also represent total data size instead of the number of antenna patterns.

"This field shall specify the length in octets of the Antenna Pattern Parameters field. "

I would suggest the following changes:
antennaPatternCount should be changed to antennaPatternSize
modulationParameterCount should be changed to modulationParameterSize
mod_bytes should always be 1 (or removed altogether)
I haven’t any data to confirm, but I think “range(0, self.antennaPatternCount)” should probably be changed to “range(0, self.antennaPatternCount//39)” as well.

I've made not specific changes myself other than to change mod_bytes to 1 when it has a value larger than 2 so that I can interpret the data.

@HalRules
Copy link
Author

The code I'm referring to is in the Parse method of the TransmitterPdu class around line 5538 of dis7.py.
Please be patient with me since I'm not adept at git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant