-
Notifications
You must be signed in to change notification settings - Fork 95
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
Decoding logic to match the proper category desctiption #185
Comments
Hi @dongsin-kim It looks like your binary data is not raw asterix. |
Hi @dsalantic, I really appreciate for your reply. Since I already signed up for a confidentiality agreement, I am not sure that I have a permission to upload (at least first 100 bytes of) a file on Github... Please let me ask this issue to an organization.. In the meantime, I am planning to replace an existing category definition (CAT 20 v1.7) to a newer version (CAT 20 v1.10 or v1.09). Maybe this issue was caused by a version inconsistency..? |
No, I don't think it will change anything. Please check the first 3 bytes of your data. First byte represents Asterix category. If you expect that it contains CAT020 then first byte must be 0x14. Next 2 bytes represent the asterix block length, so this value should be something between 10 and 1000. |
Reading the name of the file, maybe this files are from an Era Mlat system?
If so, you could try skipping first 8 bytes of each data record.
… Hi @dsalantic <https://github.com/dsalantic>, I really appreciate for
your reply. Since I already signed up for a confidentiality agreement, I am
not sure that I have a permission to upload at least first 100 bytes of a
file on Github... Please let me ask this issue to an organization..
|
Hi @dsalantic and @ifsnop, thank you for the comments. Using the AsterixInspector, I could see a table as follows:
Could I interpret this table that the first byte is Regarding skipping the first 8 bytes, how could I specify 8 bytes for skipping before the
|
Unfortunately, there is no option in asterix decoder to skip the header, but header_bytes = f.read(8) Problem is that you will skip only header of first record, so you need to calculate the record length (from second 2 bytes) and then read only record length of data. |
Hi @dsalantic, I would like to express my sincere gratitude for your effort to maintain and support this wonderful works.
I am trying to decode an actual CAT 20 data file (multilateration data of each flight on an airport) but the decode output says that the file contains a mix of category descriptions. (CAT 56, 1, 0, 254, 167, ..., etc.) Please find a relevant github issue and steps as follows:
Step1. write
main.py
Step2. execute
main.py
>> python main.py > output.txt
Step3. open
output.txt
(Please find the attached
output.txt
file)output.txt
I was hoping that I could get an output (an aircraft position, heading, callsign, velocity, ... etc. with a delimeter
,
) as follows:0,37.424707,127.126923,150, ...
1,37.424807,127.127923,151, ...
2,37.424907,127.128923,152, ...
3,37.425007,127.129923,153, ...
...
Should I specify a category description as CAT 20 before the command
parsed = asterix.parse(data)
?The text was updated successfully, but these errors were encountered: