Coder Social home page Coder Social logo

croatiacontrolltd / asterix Goto Github PK

View Code? Open in Web Editor NEW
161.0 161.0 88.0 3.11 MB

Asterix is utility used to read and parse EUROCONTROL ASTERIX protocol data from stdin, file or network multicast stream and print it to standard output in text, XML or JSON format. Source can be used to generate Wireshark dissector for ASTERIX protocol. All ASTERIX categories are defined through XML definition file.

License: GNU General Public License v2.0

Shell 0.72% Makefile 21.13% C++ 38.35% C 7.06% NSIS 10.17% CMake 5.85% Batchfile 0.90% M4 6.56% Python 9.26%

asterix's People

Contributors

acebrianjuan avatar bbertrand avatar darkbuddha avatar dsalantic avatar egregorimar avatar filipjonckers avatar ifsnop avatar imlvts avatar jbatista avatar kentpachi avatar krisun17 avatar nabilbendafi avatar nunojpg avatar sartoshi-foot-dao avatar tamot avatar wooshcz avatar zoranbosnjak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asterix's Issues

filter doesn't work on explicit dataitems

# cat conf/filter.ini
CAT021:I073:time_reception_position
CAT021:I130:Lat
CAT021:I130:Lon

./asterix -v --sync -d config/asterix.ini --filter config/filter.ini  -jh -f example/cat21_re.ast
{"timestamp":33489262,
"CAT021":{
        "I130":{
                "Lat":61.4753294,
                "Lon":-7.8786993},
        "I073":{
                "time_reception_position":28802.9218750},
        "IRE":[{}]}},
{"timestamp":33489262,
"CAT021":{
        "I130":{
                "Lat":61.4752436,
                "Lon":-7.8788495},
        "I073":{
                "time_reception_position":28803.1640625},
        "IRE":[{}]}},

IRE shouldn't be displayed, because is not in the filter definition.

inconsistent timestamp

Timestamp is defined as seconds since midnight 1/1/1970, but truncated to seconds since current midnight day.

Definition in DataBlock.h

class DataBlock
{
public:
  DataBlock(Category* cat, unsigned long len, const unsigned char* data, unsigned long nTimestamp = 0, uint32_t nCrc = 0);
  virtual
  ~DataBlock();

  Category* m_pCategory;
  unsigned long m_nLength;
  unsigned long m_nTimestamp; // Date and time when this packet was captured. This value is in seconds since January 1, 1970 00:00
  uint32_t m_nCrc;
  bool m_bFormatOK;

Creation in asterixrawsubformat.cxx

 // get current timstamp in ms since midnight
        struct timeval tp;
        gettimeofday(&tp, NULL);
        unsigned long nTimestamp = (tp.tv_sec % 86400) * 1000 + tp.tv_usec / 1000;

I think is better to have a unique timestamp, since there I usually have recordinds that spans throught midnight.

Is there any reason for truncating it?

Thanks in advance.

option --def doesn't work

Although -d option works, --def doesn't.

# ./asterix -f cat21_re.ast --def c/asterix.ini
Error: Asterix definitions file config/asterix.ini not found.

# ./asterix -f cat21_re.ast -d c/asterix.ini

-------------------------
Data Block 1
Category: 21
Len: 41
-------------------------
Data Record 1
Len: 41
Timestamp: 32809664

issue with cat240 Non-Standard Data Fields

Hello,
I'm trying to use your library with asterix radar stream, but with a cat240 stream, which implement Non-Standard Data Fields (section 4.2.5 of document 20120401-asterix-spec-v2.0.pdf ) seems to fail to decode the stream, while using it with standard cat240 radar stream I'm using it with success. It is possible to solve this issue?

minor erroe found in asterix_cat010_1_1.xml

I have found a wrong parameter in asterix_cat010_1_.xml

The data item 41 (Position in WGS-84 Coordinates) has a scale factor for both latitude and longitude of 0.000005364418029785156.

The Eurocontrol Specifications say that this scale must be 180/2^31. So, the scale factor must be 0,00000008381903171539306640625.

I made some tests with asterix cat 010 with a Southampton port radar and with this new value, the software seems to work fine and the final coordinates are correct.

Thanks a lot
Nacho

Not enough precision (for example, CAT21/074)

When scaling some dateitems (for example, CAT21/074 Time of Message Reception of Position–High Precision), the LSB is 2^-30. This is "0.000000000931322574615478515625", an once multiplied by the value in the TOMRp it gets truncated, since there are too much bits for a float.

Since there is a format specifier "encode" in the Bits tag, maybe there could be a double, which would translate to an internal c double, that would give enough precision.

The current solution (converting LSB from seconds to nanoseconds) makes operating with "I021/073 “Time of Message Reception of Position” a little bit more complicated.

SonarCloud

Recommend running the code through SonarCloud.io

Error parsing incomplete datablocks

When parsing a datablock from a file with length 2 bytes, convertengine.cxx enters a loop. Just try:

$ echo -n "0a 00" | perl -ne 's/([0-9a-f]{2})/print chr hex $1/gie' > test_cat10_length.ast
$ asterix -v -f test_cat10_length.ast
DEBUG:   May  8 20:32:51 2017 (asterix.cpp) Input channel description: disk test_cat10_length.ast:0:1 ASTERIX_RAW

DEBUG:   May  8 20:32:51 2017 (asterix.cpp) Output channel 1 description: std 0 ASTERIX_TXT

DEBUG:   May  8 20:32:51 2017 (converterengine.cxx) inputDevice(disk)
DEBUG:   May  8 20:32:51 2017 (converterengine.cxx) inputDeviceDescriptor(test_cat10_length.ast:0:1)
DEBUG:   May  8 20:32:51 2017 (converterengine.cxx) inputFormatDescriptor((null))
DEBUG:   May  8 20:32:51 2017 (converterengine.cxx) Input format: ASTERIX_RAW

DEBUG:   May  8 20:32:51 2017 (channelfactory.cxx) CChannelFactory successfully initialized with CAsterixFormat.

DEBUG:   May  8 20:32:51 2017 (diskdevice.cxx) Opened input file 'test_cat10_length.ast'

DEBUG:   May  8 20:32:51 2017 (channelfactory.cxx) AttachFormatter ASTERIX_RAW

DEBUG:   May  8 20:32:51 2017 (converterengine.cxx) Output format: ASTERIX_TXT

DEBUG:   May  8 20:32:51 2017 (channelfactory.cxx) AttachFormatter ASTERIX_TXT
ERROR:   May  8 20:32:51 2017 (asterixrawsubformat.cxx) Not enough data for packet. Size = 2
ERROR:   May  8 20:32:51 2017 (converterengine.cxx) ReadPacket() failed.
ERROR:   May  8 20:32:51 2017 (asterixrawsubformat.cxx) Not enough data for packet. Size = 2
ERROR:   May  8 20:32:51 2017 (converterengine.cxx) ReadPacket() failed.
ERROR:   May  8 20:32:51 2017 (asterixrawsubformat.cxx) Not enough data for packet. Size = 2
ERROR:   May  8 20:32:51 2017 (converterengine.cxx) ReadPacket() failed.
ERROR:   May  8 20:32:51 2017 (asterixrawsubformat.cxx) Not enough data for packet. Size = 2
...

Example for reading Special Purpose field in CAT48

Hello,

i'm looking for an example to read the Special Purpose field

in the xml its configured as following

<DataItem id="SP" >
        <DataItemName>Special Purpose Field</DataItemName>
        <DataItemDefinition>SP</DataItemDefinition>
        <DataItemFormat desc="Explicit">
            <Explicit>
                    <Fixed length="1">
                        <Bits from="8" to="1">
                        <BitsShortName>SP</BitsShortName>
                        <BitsName>SP</BitsName>
                        </Bits>
                    </Fixed>
                </Explicit>
        </DataItemFormat>
        <DataItemNote/>
    </DataItem> 

I have a stream that contains a SP field but the parser is not able to show it up

the SP field content has variable length, the lenght is in the first octets

do you have any clue about how i can implement this "conditional" length using the xml definitions ?

thank you for help

Path with spaces problems

Hello, I tried to charge a file that's inside a folder that has name with spaces, and it does not run.

./asterix.exe -P -f ../../../Desktop/Hola\ Hola/prueba.pcap

results:
ERROR: Jul 10 11:01:01 2018 (channelfactory.cxx) Unknown format 'Hola/prueba.pcap:0:1'.

I tried every kind of combinations, but nothing to do.
Could you help me please?
Thank you in advance

Wrong parsed in CAT021

There is an error parsing a specify ByteCode in cat021.

The byte array that I am trying to parse is the following:
bytearray([0x15,0x00,0x55,0xF3,0x1B,0x39,0x5B,0xD3,0xC7,0x04,0x14,0xCB,0x01,0x48,0x05,0xBB,0x02,0x0F,0x65,0x7E,0x22,0xFE,0xF6,0xB7,0x12,0x50,0x6C,0x22,0x94,0x80,0x7E,0x94,0x77,0x6D,0x41,0xD3,0x01,0x00,0x0A,0x07,0xCA,0x00,0x00,0x1E,0x01,0xDA,0xD3,0x10,0x94,0x80,0x90,0x10,0xC2,0x30,0xD9,0x68,0x20,0x03,0xA0,0xF0,0x02,0x02,0x01,0x05,0x02,0xF1,0x41,0xD1,0x40,0xB5,0xD6,0xFF,0x06,0xD6,0xB7,0xB7,0x0C,0x06,0x07,0x48,0x05,0xB1,0x42,0x91,0xD2])

The code returns three differents records:
Asterix record: 1
Len: 71
CRC: 00000000
Timestamp: 1554978332645 (2019-04-11 10:25:32.645000)
Category: 21 (Surveillance Data Exchange - Part 12 ADS-B Reports)
Item: crc ()00000000
Item: ts ()1554978332645
Item: len ()71

Asterix record: 2
Len: 8
CRC: 00000020
Timestamp: 1554978332645 (2019-04-11 10:25:32.645000)
Category: 21 (Surveillance Data Exchange - Part 12 ADS-B Reports)
Item: crc ()00000020
Item: ts ()1554978332645
Item: len ()8

Asterix record: 3
Len: 3
CRC: 4BFAC910
Timestamp: 1554978332645 (2019-04-11 10:25:32.645000)
Category: 21 (Surveillance Data Exchange - Part 12 ADS-B Reports)
Item: crc ()4BFAC910
Item: ts ()1554978332645
Item: len ()3

When it is only one with length = 254.

Python Modul

Error: parsed = asterix.parse(asterix_packet,'text')

TypeError: parse() takes exactly 1 argument (2 given)

and the documentation on the init.py says this:

If you want to receive textual presentation of asterix packet instead of list use 'text' parameter::

formatted = asterix.parse(asterix_packet, 'text')
print(formatted)

also how can I subscribe and parse the real time data coming from ip and port ?

Filtering of Repetitive and Explicit DataItem

Filtering of Repetitive and Explicit DataItem doesn't work as expected.
Even when filtered, those items are still displayed (with empty fields).

Running:
./asterix -F -f 20140505_0900_0915_record_data_wam_19_20 -LF filter -jh
with no CAT020 in the filter file (only CAT019) gives some cat20 items:
{"CAT020":{
"I400":[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],
"I250":[{},{},{},{},{}],
"IRE":[{},{},{},{},{}]}},

Skip block with invalid length

We have some asterix recordings in final format with a missing byte from time to time.

Running asterix -d /etc/asterix/asterix.ini -F -f missing_byte.ff -j gives:

{"timestamp":4244580,"CAT002":{"I010":{"SAC":64,"SIC":11},"I000":{"type":2},"I020":{"Azi":112.5000000},"I030":{"ToD":4243.6093750}}},
ERROR:   Sep 16 09:21:56 2015 (asterixformat.cxx) Wrong Asterix data length (11)
ERROR:   Sep 16 09:21:56 2015 (asterixformat.cxx) DataItem::parse needed length=3 , and there is only 2
ERROR:   Sep 16 09:21:56 2015 (asterixformat.cxx) Wrong length in DataItem format for CAT002/I030
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid
Aborted (core dumped)

Indead, using recview, it's easy to see that one byte is missing at 01:10:44,76:

L10 E00 T01:10:44,58 ->  0200 0BF0 400B 0250 0849 CE
L10 E00 T01:10:44,76 ->  0200 0BF0 400B 0208 49E6
L10 E00 T01:10:44,95 ->  0200 0BF0 400B 0260 0849 FE

It would be nice if asterix could just skip the invalid block and continue the parsing instead of crashing.

Final format file with missing byte: https://www.dropbox.com/s/inft659zmhkn5yb/missing_byte.ff?dl=0
Same file decoded in hexa: https://www.dropbox.com/s/2znv584x1h03bi5/missing_byte.hex?dl=0

Processing stdin

Hi!

My understanding of usage is that the following two lines should be equivalent:

$ asterix -f file.asterix
$ cat file.asterix | asterix

But there are two problems here, one is that asterix always expects some arguments, otherwise it prints the help. This can be workaround with a dummy argument. The other is that it still fails to process the stdin input, and loops forever with error messages like:

ERROR:   May 17 11:01:21 2019 (converterengine.cxx) ReadPacket() failed.
ERROR:   May 17 11:01:21 2019 (asterixrawsubformat.cxx) Not enough data for packet! Size = 142, left = 0.

Let me know if this is not a issue and I'm just making totally wrong assumptions.

Thanks!

Segmentation fault

Run asterix:
./asterix -jh -i 232.1.1.12:10.10.3.103:21112

Send data to it:
echo -ne "\xf0\x00\x04\x80\x01\x01" | socat - udp-datagram:232.1.1.12:21112,ip-add-membership=232.1.1.12:10.10.3.103

Debug messages:
`DEBUG: Jun 21 16:51:59 2016 (asterix.cpp) Input channel description: udp 232.1.1.12:10.10.3.103:21112 ASTERIX_RAW

DEBUG: Jun 21 16:51:59 2016 (asterix.cpp) Output channel 1 description: std 0 ASTERIX_JSONH

DEBUG: Jun 21 16:51:59 2016 (converterengine.cxx) inputDevice(udp)
DEBUG: Jun 21 16:51:59 2016 (converterengine.cxx) inputDeviceDescriptor(232.1.1.12:10.10.3.103:21112)
DEBUG: Jun 21 16:51:59 2016 (converterengine.cxx) inputFormatDescriptor((null))
DEBUG: Jun 21 16:51:59 2016 (converterengine.cxx) Input format: ASTERIX_RAW

DEBUG: Jun 21 16:51:59 2016 (channelfactory.cxx) CChannelFactory successfully initialized with CAsterixFormat.

DEBUG: Jun 21 16:51:59 2016 (udpdevice.cxx) Successfully joined multicast 232.1.1.12

DEBUG: Jun 21 16:51:59 2016 (channelfactory.cxx) AttachFormatter ASTERIX_RAW

DEBUG: Jun 21 16:51:59 2016 (converterengine.cxx) Output format: ASTERIX_JSONH

DEBUG: Jun 21 16:51:59 2016 (channelfactory.cxx) AttachFormatter ASTERIX_JSONH

DEBUG: Jun 21 16:52:03 2016 (udpdevice.cxx) Read message from 10.10.3.103 on address 10.10.3.103.
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) InputParser::parsePacket m_pBuffer=0x2767500 bufferSize=6
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataBlock::DataBlock len=1, data=0x2767503
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=1 data=0x2767503
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) UAP not found for category 240
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) Wrong Asterix data length (256)
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataBlock::DataBlock len=65535, data=0x2767507
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65535 data=0x2767507
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65534 data=0x2767508
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65521 data=0x2767515
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65520 data=0x2767516
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65519 data=0x2767517
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65518 data=0x2767518
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65508 data=0x2767522
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65485 data=0x2767539
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65476 data=0x2767542
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65456 data=0x2767556
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65451 data=0x276755b
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65442 data=0x2767564
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65426 data=0x2767574
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65406 data=0x2767588
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65395 data=0x2767593
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65384 data=0x276759e
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataRecord::DataRecord len=65373 data=0x27675a9
ERROR: Jun 21 16:52:03 2016 (asterixformat.cxx) DataItem format not defined for CAT001/I
Segmentation fault
`

Data Item I021/130 (ed. 0.26) parsing

The parser outputs latitude and longitude incorrectly, multiplied by 4. This is because scale in category definition is the same as for edition 1.x (180/2^23), but should be (180/2^25).

Build problem

Hi
I'm try to build application - in folder asterix/src start command make as root but have an error:

[strela@D01 src]$ make
=== making engine ===
make[1]: Entering directory /usr2/strela/ASTERIX_MASTER/src/engine' make[1]: Nothing to be done forall'.
make[1]: Leaving directory /usr2/strela/ASTERIX_MASTER/src/engine' === making asterix === make[1]: Entering directory/usr2/strela/ASTERIX_MASTER/src/asterix'
g++ -c -o ../../obj/asterix/release/AsterixData.o -Wall -O2 -I../../src/engine
-I../../src/asterix -I../../src/main -Wp,-MD,../../obj/asterix/release/AsterixDa
ta.P AsterixData.cpp
In file included from AsterixDefinition.h:27,
from AsterixData.h:29,
from AsterixData.cpp:23:
Category.h:30:17: UAP.h: No such file or directory
In file included from AsterixDefinition.h:27,
from AsterixData.h:29,
from AsterixData.cpp:23:
Category.h:46: error: UAP' was not declared in this scope Category.h:46: error: template argument 1 is invalid Category.h:46: error: template argument 2 is invalid Category.h:46: error: ISO C++ forbids declaration ofm_lUAPs' with no type
Category.h:49: error: ISO C++ forbids declaration of UAP' with no type Category.h:49: error: expected;' before '' token
Category.h:50: error: ISO C++ forbids declaration of UAP' with no type Category.h:50: error: expected;' before '
' token
make[1]: *** [../../obj/asterix/release/AsterixData.o] Error 1
make[1]: Leaving directory `/usr2/strela/ASTERIX_MASTER/src/asterix'
make: *** [all] Error 1

P.S. I'm using Red Hat 4.8

filter appends extra characters in multibit dataitems

# cat filter.conf
CAT021:I040:ATP

# obj/main/debug/asterix -d install/config/asterix.ini -f install/sample_data/cat21_re.ast --filter filter.conf -j

{"timestamp":33068651,"CAT021":{"I040":{"ATP":0,}}},

After "ATP":0, a comma is inserted, that leads to an error when parsing the produced JSON.

Is it possible to remove that comma?

Data Item I048/020, Target Report Descriptor: XPP missing

At least in version 1.21 of the CAT048 specification the Data Item I048/020, Target Report Descriptor contains the XPP bit in the first extend. So

<Bits from="7" to="6">
    <BitsShortName>spare</BitsShortName>
    <BitsName>spare bits set to 0</BitsName>
    <BitsConst>0</BitsConst>                       
</Bits>

should be

<Bits bit="7">
    <BitsShortName>spare</BitsShortName>
    <BitsName>spare bit set to 0</BitsName>
    <BitsConst>0</BitsConst>                       
</Bits>
<Bits bit="6">
    <BitsShortName>XPP</BitsShortName>
    <BitsName>XPP</BitsName>
    <BitsValue val="0">No X-Pulse present</BitsValue>
    <BitsValue val="1">X-Pulse present</BitsValue>
</Bits>

Implementing BDS decoding using fixed length definitions

Hi Damir,

Do you think is it possible to define the bds contents inside I48/250 (ie. bds40, bds50, bds60) using fixed length definitions? Once defined, is it possible to reference them inside the cat48 xml?

I could provide examples for all of them, if needed, and also write the new xml files, if it is feasible.

What do you think?

How to read datas in cast?

Hi, thanks you for helping me with the previous problem.

I'd like to ask you how can use de decoder reading datas sent by a sensor. I mean, how to read the datas like wireshark in streaming, because the -i m:i:p[:s] use a multicast. To do this, have I to mount a multicast? and what is exactly the interface address? 'cause I understand that: Multicast IP address(address multicast between 224.0.0.0 a 239.255.255.255):Interface address(the gateway??):Port(source port)[:Source address], is it right?

CAT020 problem

Mail from Sergey:
I have some doubt with program, I try to parse ASTERIX CAT19, CAT20, CAT21 messages from tcpdump output file.
Input line is:
asterix.exe –P –d config/asterix.ini –f /path_to_pcap_file.cap
also I changed asterix.ini – remove all lines and add only asterix_cat019_1_2.xml, asterix_cat020_1_7.xml, asterix_cat021_1_8.xml.
On the output of program I saw only ASTERIX CAT19 messages and errors like “UAP not found for category 21”

asterix_cat034_1_26.xml: Data item 050 SSR status: bit 4 read twice

Parsing the bit 4 "OVL RDP" is not correct as not part of the standard.

Proposal remove first Bit element: Change this:
<Bits bit="4">
<BitsShortName>OVL RDP</BitsShortName>
<BitsName>OVL RDP</BitsName>
<BitsValue val="1">Overload in RDP</BitsValue>
<BitsValue val="0">No overload</BitsValue>
</Bits>
<Bits bit="4">
<BitsShortName>MSC</BitsShortName>
<BitsName>MSC</BitsName>
<BitsValue val="1">Monitoring system disconnected</BitsValue>
<BitsValue val="0">Monitoring system connected</BitsValue>
</Bits>

to

<Bits bit="4">
<BitsShortName>MSC</BitsShortName>
<BitsName>MSC</BitsName>
<BitsValue val="1">Monitoring system disconnected</BitsValue>
<BitsValue val="0">Monitoring system connected</BitsValue>
</Bits>

Problem while decoding asterix data cat 021

Hi here
I want to decode asterix data cat 021 files and I got the following errors:

DEBUG: Mar 15 15:58:13 2018 (InputParser.cpp) [15 00 2B FF A1 DA B9 E0 00 28 A8 BF 93 F9 50 0D 20 91 14 40 07 EE 17 30 00 07 08 05 78 00 00 08 B7 5D 88 08 15 F2 C3 6E 60 00 00]
ERROR: Mar 15 15:58:13 2018 (asterixformat.cxx) DataItem::parse needed length=2 , and there is only 0 : [ ]
ERROR: Mar 15 15:58:13 2018 (asterixformat.cxx) Wrong length in DataItem format for CAT021/I145
ERROR: Mar 15 15:58:13 2018 (asterixformat.cxx) Data Record bytes: [ FF A1 DA B9 E0 00 28 A8 BF 93 F9 50 0D 20 91 14 40 07 EE 17 30 00 07 08 05 78 00 00 08 B7 5D 88 08 15 F2 C3 6E 60 00 00 ]
ERROR: Mar 15 15:58:13 2018 (asterixformat.cxx) Record not parsed properly. CAT021 len=40

Can anyone help me to identify the issue? is the problem from the files or from the application?

Compiling fails under Alphine docker os image

udpdevice.hxx:63:5: error: 'fd_set' does not name a type; did you mean 'tzset'?
This can get solved by adding the <sys/select.h> library in the devicefactory.hxx and by
Installing in the Docker image expat: "apk add expat-dev"

Memory not freed when asterix ends

When running asterix within valgrind, there are some blocks that aren't correclty freed when exiting.

==2851== LEAK SUMMARY:
==2851== definitely lost: 0 bytes in 0 blocks
==2851== indirectly lost: 0 bytes in 0 blocks
==2851== possibly lost: 412,850 bytes in 8,739 blocks
==2851== still reachable: 598,628 bytes in 11,992 blocks
==2851== suppressed: 0 bytes in 0 blocks

For example:

==2855== 7,973 bytes in 103 blocks are possibly lost in loss record 65 of 80
==2855== at 0x4C286E7: operator new(unsigned long) (vg_replace_malloc.c:287)
==2855== by 0x5118998: std::string::Rep::S_create(unsigned long, unsigned long, std::allocator const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==2855== by 0x5118B92: std::string::M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==2855== by 0x5118D2B: std::string::M_replace_safe(unsigned long, unsigned long, char const, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==2855== by 0x41C621: XMLParser::ElementHandlerStart(void
, char const
, char const
*) (XMLParser.cpp:212)

Do you think this could be fixed?

Issue with enforcement of fx=1

When Variable type is used, there is a check that all items end with an FX bit.

In I021/271, only the Primary Subfield has an FX bit, the bit 1 in first extension is used to encode Length / Width of Aircraft.
This is not a mistake as it is explicitly described in a note:
NOTE - This data item is a variant of the “Extended length data field” as
described in ASTERIX part1. The LSB in the first extension is not
used as FX-bit.

The current XML description of cat 021 follows the standard and the file is rejected because of the check on fx=1.

how to install under windows?

pip install asterix-decoder

...
python_parser.cpp
./src/asterix\XMLParser.h(27): fatal error C1083: Cannot open include file:: “expat.
h”: No such file or directory
error: command 'C:\Dev\Microsoft Visual Studio 14.0\VC\BIN\cl.exe' fail
ed with exit status 2

I then downloaded and installed libexpat, the error remains.

thanks.

filtering fails to properly produce valid json output

Please look at the preceding ',' before "RoT".


# asterix/obj/main/debug/asterix -v -d conf/asterix.ini -i -s -LF conf/filter.ini  -j -f cat21_v0.26_filter_di165v2.ast

DEBUG:   Jun 28 11:40:39 2016 (InputParser.cpp) [15 00 2D FB B1 B1 06 00 00 00 28 4E 8F C5 00 58 15 D5 00 58 15 D5 FF FF FF 00 07 08 05 78 07 C8 00 00 01 00 10 10 10 10 10 20 08 23 00]
{"timestamp":42039051,"CAT021":{"I165":{,"RoT":0.0000000}}},

# cat conf/filter.ini
CAT021:I165:RoT

#cat conf/asterix.ini
asterix_cat021_0_26.xml

cat21_v0.26_filter_di165v2.zip

Could you please have a look at this issue? Filtering is a very useful feature!

error on Win installation of package

Pozdrav iz USA,

Pokusavam da instaliram vas program ali imam problema sa greskama koje kazu slijedece (ispod), Kakave su sanse da to neko pogleda i uputi me kako da uspjesno zavrsim insataliranje.

Pozdrav,
Dejan

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Python27\Lib\asterix_decoder-0.5.0>C:\Python27\python.exe setup.py install
running install
running bdist_egg
running egg_info
writing asterix_decoder.egg-info\PKG-INFO
writing top-level names to asterix_decoder.egg-info\top_level.txt
writing dependency_links to asterix_decoder.egg-info\dependency_links.txt
reading manifest file 'asterix_decoder.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'asterix_decoder.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\asterix
copying asterix\version.py -> build\lib.win32-2.7\asterix
copying asterix_init_.py -> build\lib.win32-2.7\asterix
creating build\lib.win32-2.7\asterix\config
copying asterix\config\asterix.dtd -> build\lib.win32-2.7\asterix\config
copying asterix\config\asterix_bds.xml -> build\lib.win32-2.7\asterix\config
copying asterix\config\asterix_cat001_1_1.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat002_1_0.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat004_1_8.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat008_1_0.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat010_1_1.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat019_1_2.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat020_1_7.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat021_1_8.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat023_1_2.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat030_6_2.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat031_6_2.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat032_7_0.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat034_1_27.xml -> build\lib.win32-2.7\asterix\co
nfig
copying asterix\config\asterix_cat048_1_21.xml -> build\lib.win32-2.7\asterix\co
nfig
copying asterix\config\asterix_cat062_1_16.xml -> build\lib.win32-2.7\asterix\co
nfig
copying asterix\config\asterix_cat063_1_3.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat065_1_3.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat240_1_3.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat247_1_2.xml -> build\lib.win32-2.7\asterix\con
fig
copying asterix\config\asterix_cat252_7_0.xml -> build\lib.win32-2.7\asterix\con
fig
creating build\lib.win32-2.7\asterix\examples
copying asterix\examples_init_.py -> build\lib.win32-2.7\asterix\examples
copying asterix\examples\multicast_receive.py -> build\lib.win32-2.7\asterix\exa
mples
copying asterix\examples\multicast_send_receive.py -> build\lib.win32-2.7\asteri
x\examples
copying asterix\examples\read_pcap_file.py -> build\lib.win32-2.7\asterix\exampl
es
copying asterix\examples\read_raw_bytes.py -> build\lib.win32-2.7\asterix\exampl
es
copying asterix\examples\read_raw_file.py -> build\lib.win32-2.7\asterix\example
s
creating build\lib.win32-2.7\asterix\sample_data
copying asterix\sample_data\cat034.raw -> build\lib.win32-2.7\asterix\sample_dat
a
copying asterix\sample_data\cat048.raw -> build\lib.win32-2.7\asterix\sample_dat
a
copying asterix\sample_data\cat062cat065.raw -> build\lib.win32-2.7\asterix\samp
le_data
copying asterix\sample_data\cat_034_048.pcap -> build\lib.win32-2.7\asterix\samp
le_data
copying asterix\sample_data\cat_062_065.pcap -> build\lib.win32-2.7\asterix\samp
le_data
creating build\lib.win32-2.7\asterix\test
copying asterix\test_init_.py -> build\lib.win32-2.7\asterix\test
copying asterix\test\parsing_error_1.xml -> build\lib.win32-2.7\asterix\test
copying asterix\test\parsing_error_2.xml -> build\lib.win32-2.7\asterix\test
copying asterix\test\test_init.py -> build\lib.win32-2.7\asterix\test
copying asterix\test\test_parse.py -> build\lib.win32-2.7\asterix\test
copying asterix\test\valgrind-python.supp.txt -> build\lib.win32-2.7\asterix\tes
t
running build_ext
building '_asterix' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\src
creating build\temp.win32-2.7\Release\src\python
creating build\temp.win32-2.7\Release\src\asterix
C:\Users\554083\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.
0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I./asterix/python -I./src/
asterix -I./src/engine -IC:\Python27\include -IC:\Python27\PC /Tc./src/python/as
terix.c /Fobuild\temp.win32-2.7\Release./src/python/asterix.obj -DPYTHON_WRAPPE
R
asterix.c
C:\Users\554083\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.
0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I./asterix/python -I./src/
asterix -I./src/engine -IC:\Python27\include -IC:\Python27\PC /Tc./src/python/py
thon_wrapper.c /Fobuild\temp.win32-2.7\Release./src/python/python_wrapper.obj -
DPYTHON_WRAPPER
python_wrapper.c
./src/python/python_wrapper.c(44) : error C2275: 'PyObject' : illegal use of thi
s type as an expression
c:\python27\include\object.h(108) : see declaration of 'PyObject'
./src/python/python_wrapper.c(44) : error C2065: 'arglist' : undeclared identifi
er
./src/python/python_wrapper.c(45) : error C2275: 'PyObject' : illegal use of thi
s type as an expression
c:\python27\include\object.h(108) : see declaration of 'PyObject'
./src/python/python_wrapper.c(45) : error C2065: 'result' : undeclared identifie
r
./src/python/python_wrapper.c(46) : error C2065: 'arglist' : undeclared identifi
er
./src/python/python_wrapper.c(46) : warning C4047: '=' : 'int' differs in levels
of indirection from 'PyObject *'
./src/python/python_wrapper.c(47) : error C2065: 'result' : undeclared identifie
r
./src/python/python_wrapper.c(47) : error C2065: 'arglist' : undeclared identifi
er
./src/python/python_wrapper.c(47) : warning C4047: 'function' : 'PyObject *' dif
fers in levels of indirection from 'int'
./src/python/python_wrapper.c(47) : warning C4024: 'PyObject_CallObject' : diffe
rent types for formal and actual parameter 2
./src/python/python_wrapper.c(47) : warning C4047: '=' : 'int' differs in levels
of indirection from 'PyObject *'
./src/python/python_wrapper.c(48) : error C2065: 'arglist' : undeclared identifi
er
./src/python/python_wrapper.c(48) : error C2065: 'arglist' : undeclared identifi
er
./src/python/python_wrapper.c(48) : error C2065: 'arglist' : undeclared identifi
er
./src/python/python_wrapper.c(49) : error C2065: 'result' : undeclared identifie
r
./src/python/python_wrapper.c(49) : warning C4047: '==' : 'int' differs in level
s of indirection from 'void '
./src/python/python_wrapper.c(52) : error C2065: 'result' : undeclared identifie
r
./src/python/python_wrapper.c(52) : error C2065: 'result' : undeclared identifie
r
./src/python/python_wrapper.c(52) : error C2065: 'result' : undeclared identifie
r
./src/python/python_wrapper.c(64) : error C2143: syntax error : missing ';' befo
re 'type'
./src/python/python_wrapper.c(65) : error C2065: 'ret' : undeclared identifier
./src/python/python_wrapper.c(74) : error C2143: syntax error : missing '{' befo
re '
'
./src/python/python_wrapper.c(104) : warning C4133: 'return' : incompatible type
s - from 'PyObject *' to 'int *'
./src/python/python_wrapper.c(132) : error C2275: 'PyObject' : illegal use of th
is type as an expression
c:\python27\include\object.h(108) : see declaration of 'PyObject'
./src/python/python_wrapper.c(132) : error C2065: 'lstBlocks' : undeclared ident
ifier
./src/python/python_wrapper.c(135) : error C2065: 'lstBlocks' : undeclared ident
ifier
./src/python/python_wrapper.c(135) : warning C4047: '==' : 'int' differs in leve
ls of indirection from 'void *'
./src/python/python_wrapper.c(137) : error C2065: 'lstBlocks' : undeclared ident
ifier
./src/python/python_wrapper.c(137) : warning C4047: 'return' : 'PyObject *' diff
ers in levels of indirection from 'int'
./src/python/python_wrapper.c(162) : error C2275: 'PyObject' : illegal use of th
is type as an expression
c:\python27\include\object.h(108) : see declaration of 'PyObject'
./src/python/python_wrapper.c(162) : error C2065: 'py_output' : undeclared ident
ifier
./src/python/python_wrapper.c(165) : error C2065: 'py_output' : undeclared ident
ifier
./src/python/python_wrapper.c(165) : warning C4047: '==' : 'int' differs in leve
ls of indirection from 'void *'
./src/python/python_wrapper.c(171) : error C2065: 'py_output' : undeclared ident
ifier
./src/python/python_wrapper.c(171) : warning C4047: 'return' : 'PyObject *' diff
ers in levels of indirection from 'int'
error: command 'C:\Users\554083\AppData\Local\Programs\Common\Microsoft\
Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

C:\Python27\Lib\asterix_decoder-0.5.0>cd C:\Python27\Lib\asterix_decoder-0.5.0

creation of cat021/RE (asterix coding rules for reserved expansion field)

I'm having some problems adding the RE definitions for the cat21. I haven't found documentation for the use of explicit, compound and variable/fixed xml tags, so for sure I'm doing something wrong.

In the Eurocontrol pdf, the RE definition is as follows:

Length indicator
-> compound
-> -> fixed (BPS)
-> -> fixed (SelH)
-> -> fixed (NAV)
-> -> fixed (GAO)
-> -> variable (2 bytes with fx, 1 byte) (SGV)
-> -> variable (1 byte with fx) (STA)
-> -> fixed (TNH)

How should I encode this? This is my current try:

<explicit> (to use the length byte)
* <compound>
**  <variable>
*** <fixed> <bits></bits> </fixed> (define the presence bits)
** </variable>
** <fixed> <bits> </bits> </fixed> (definition of BPS)
** <fixed> <bits> </bits> </fixed> (definition of  SelH)
** <fixed> <bits> </bits> </fixed> (definition of  NAV)
** <fixed> <bits> </bits> </fixed> (definition of  GAO)
** <variable> <fixed length=2> <bits> </bits> </fixed> <fixed length=1><bits></bits></fixed></variable> (definition of  SGV)
** <variable> <fixed> <bits> </bits> </fixed> </variable> (definition of STA)
** <fixed> <bits> </bits> </fixed> (definition of TNH)
* </compound>
</explicit>

Although the resulting xml is parsed ok, decoding fails.

"IRE":[{
"SGV_presence":{
"STP":1,
"HTS":1,
"HTT":1,
"HRD":1,
"GSS":0.0000000,
"FX":1,
"HGT":137.8125000,
"FX":0}},{}]}},

after the last FX, output should end.

Could you give any advice? Thanks.

Is the asterix capable to project the cat 240 stream into visulized image?

It is not an issue, but a clarification question. I do have a stream of radar data cat 240 coming from SPX Radar Simulator and asterix is successfully receiving the stream and parsing it. What I need is to visualizing radar data on my monitor as radar image. See the attachment.

I am trying to write a code in python to parse the cat 240 line by line output generated by asterix then use the "Data Item I240/050, Video Block Low Data Volume" data to construct my radar image, but no luck so far. I am open to any suggestions!

For three seconds, I get 6000 Data Block output from Asterix, and here is a sample output of Data Block from "asterix -i ip:ip:port" command for one record is:

"-------------------------
Data Block 1
Category: 240
Len: 1376

Data Record 1
Len: 1376
CRC: 3555AA95
Timestamp: 66896282

Item 010 : Data Source Identifier
[ 00 00 ]
System Area Code: 0
System Identification Code: 0

Item 000 : Message Type
[ 02 ]
Message Type: 2 (Video message)

Item 020 : Video Record Header
[ 0B E8 C3 56 ]
Message Sequence Identifier: 199803734

Item 041 : Video Header Femto
[ 2A 9A 2A B3 00 00 00 00 02 54 75 86 ]
Start azimuth of the cells group: 10906 (59.9084473 deg)
End azimuth of the cells group: 10931 (60.0457764 deg)
Starting range of the cells group, expressed in number of cells: 0
Video cell duration in femto-seconds: 39089542

Item 048 : Video Cells Resolution and Data Compression Indicator
[ 00 04 ]
Data Compression Indicator: 0 (No compression applied)
spares bit set to 0: 0
Bit resolution used for the coding of the amplitude of the video signal in every cell of a video group: 4 (High Resolution (coding length = 8 bits))

Item 049 : Video Octets and Video Cells Counters
[ 05 14 00 05 14 ]
Number of valid octets: 1300
Number of valid cells: 1300

Item 051 : Video Block Medium Data Volume
[ 15 05 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 23 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 21 21 21 21 21 21 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 25 25 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 25 25 25 25 25 25 25 25 25 24 24 24 23 23 23 23 23 22 22 22 22 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 23 23 23 23 23 23 23 23 23 23 23 23 23 23 22 22 22 22 22 22 22 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24 24 24 24 24 24 22 22 22 22 22 22 22 22 21 21 21 23 23 23 23 24 24 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 24 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
Video signal amplitude of the cells in the group: 052E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E23262626262626262626262626262626262626262626262626
Video signal amplitude of the cells in the group: 2626262626262626262626262626262625252525252525252525252525252525252525212121212121FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Video signal amplitude of the cells in the group: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Video signal amplitude of the cells in the group: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Video signal amplitude of the cells in the group: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF252525252525252524242424242424242424242424242424242424252525252525252525252525252525252525252525
Video signal amplitude of the cells in the group: 25252525252525252525252525252525252323232323232323232323232323232323232323232323232323232323232326262626262626262626262626262626
Video signal amplitude of the cells in the group: 26262626262626262626262626262626262626262626262626262626262626262626252525252525252525242424232323232322222222242424242424242424
Video signal amplitude of the cells in the group: 24242424242424242424242424242424242424242424242424242424242323232323232323232323232323222222222222222525252525252525252525252525
Video signal amplitude of the cells in the group: 25252525252525252525252525252525252525252525252524242424242424242424242424242424242424242424242424242424242424242424242424242424
Video signal amplitude of the cells in the group: 24242424242424242424242525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525
Video signal amplitude of the cells in the group: 25252525252525252525252524242424242422222222222222222121212323232324242424242424242424242425252525252525252525252525252525252525
Video signal amplitude of the cells in the group: 25252525252525252525252525252525252525252525262626262626262626262626262626262626262626262626262626262626262626262626262624252525
Video signal amplitude of the cells in the group: 25252525252525252525252525252525252525252525252525252525252525252525252626262626262626262626262626262626262626262626262626262626
Video signal amplitude of the cells in the group: 26262626262626262626262626262626262626262626262626262626262626262626262626262626262624262626262626262626262626262626262626262626
Video signal amplitude of the cells in the group: 26262626262626262626262626262626262525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525
Video signal amplitude of the cells in the group: 25252525252525252525252525252525252525252525252525252626262626262626262626262626262626262626262626262626262626262626262626262626
Video signal amplitude of the cells in the group: 24242424242424242424252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525
Video signal amplitude of the cells in the group: 25252525252525252525252526262626262626262626262626262626262626262626262626262626262626262626262626262525252525252525252525252525
Video signal amplitude of the cells in the group: 25252525252525252525252525252424242424242424242424242424242424242525252525252525252525252525252525252626262626262626262626262626
Video signal amplitude of the cells in the group: 26262626262626262626262626262626262626262626262624242424242424242424242424242424242424242424242424262626262626262626262626262626
Video signal amplitude of the cells in the group: 26262626262626262626262626262626262626260000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Item 140 : Time Of Day
[ 82 A8 2E ]
Time Of Day: 8562734 (66896.3593750 s)


Data Block 2
Category: 240
Len: 780

Data Record 1
Len: 780
CRC: 61E68A4A
Timestamp: 66896282

Item 010 : Data Source Identifier
[ 00 00 ]
System Area Code: 0
System Identification Code: 0

Item 000 : Message Type
[ 02 ]
Message Type: 2 (Video message)

Item 020 : Video Record Header
[ 0B E8 C3 57 ]
Message Sequence Identifier: 199803735

Item 041 : Video Header Femto
[ 2A 9A 2A B3 00 00 05 14 02 54 75 86 ]
Start azimuth of the cells group: 10906 (59.9084473 deg)
End azimuth of the cells group: 10931 (60.0457764 deg)
Starting range of the cells group, expressed in number of cells: 1300
Video cell duration in femto-seconds: 39089542

Item 048 : Video Cells Resolution and Data Compression Indicator
[ 00 04 ]
Data Compression Indicator: 0 (No compression applied)
spares bit set to 0: 0
Bit resolution used for the coding of the amplitude of the video signal in every cell of a video group: 4 (High Resolution (coding length = 8 bits))

Item 049 : Video Octets and Video Cells Counters
[ 02 EC 00 02 EC ]
Number of valid octets: 748
Number of valid cells: 748

Item 050 : Video Block Low Data Volume
[ BB 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 22 22 22 22 22 22 22 22 23 23 23 23 23 23 23 23 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 23 23 23 23 23 23 23 23 23 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 22 22 22 22 22 22 22 22 22 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 ]
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 23232323
Video signal amplitude of the cells in the group: 23232323
Video signal amplitude of the cells in the group: 23232323
Video signal amplitude of the cells in the group: 23232323
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252524
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242422
Video signal amplitude of the cells in the group: 22222222
Video signal amplitude of the cells in the group: 22222223
Video signal amplitude of the cells in the group: 23232323
Video signal amplitude of the cells in the group: 23232326
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26232323
Video signal amplitude of the cells in the group: 23232323
Video signal amplitude of the cells in the group: 23232525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262622
Video signal amplitude of the cells in the group: 22222222
Video signal amplitude of the cells in the group: 22222222
Video signal amplitude of the cells in the group: 24252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252526
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 25252525
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 24242424
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626
Video signal amplitude of the cells in the group: 26262626

Item 140 : Time Of Day
[ 82 A8 2E ]
Time Of Day: 8562734 (66896.3593750 s)
"

selection_009

need help

Hi everyone
I'm using Asterix on linux Debian, I have done the installation but I don't know how to run it
would anyone help me?
thanks

Implement error reporting in python

Currently parsing in python does not return error indication if something is wrong with input data or format definition, but it just ignores the error and returns what is available.
In c++ version, errors are printed to stderr.

Idea is to implement errors in python version.
Three possible ways:

  1. Return python exception after first error
    That way error will be easily detected, but correct data (if any) will not be returned.
  2. Return special field in return dictionary (e.g. list of erros) where all errors will be listed together with parsed data.
  3. Implement both ways, but activate them by flag in calling function.
    e.g. exception=True, errros=True

Implement parallel decoding of different category versions

Currently user can use only one version of category definition (e.g. CAT21 v1.8).
User can manually change the definition of category, but can not use two versions of same category in parallel.
The idea is to implement flag in parse function to set the desired category version.
E.g.
data1=Asterix.parse(data, verbose=False, Cat21=2.4)
data2=Asterix.parse(data, verbose=False, Cat21=1.8)

Need help

Hi all,
It's not an issue but I want help if you can.
I need a tool or a application to display the data we have decoded on map, like google MAP.
Thanks

Problem found in DataItemBits::getBits(.....)

Dear All

I have found a problem when DataItemBits::getUnsigned calls DataItemBits::getBits with (for example) the next parameteres:

unsigned char* DataItemBits::getBits( [pData], bytes=2, frombit=9, tobit 16)

numberOfBytes has the value 1

At the end of the method, when running the intruction
_pTmp =_pTmp<< (8-outbits);
pTmp is pointing a memory position with address pVal+1, that is wrong, because pVal was initialized with memset(pVal, 0, numberOfBytes);

When the caller method (GetUnsigned) try to delete pVal, it crashes.
I have applied a very basic solution to protect this situation:

if(pVal+numberOfBytes-1>=pTmp)
_pTmp =_pTmp<< (8-outbits);
return pVal;

Thank you very much

Best Regards
Nacho

#

I had a problem when testing the new version with some asterix samples, but was my fault (didn't clean before build). Couldn't delete this comment, so I will close it.

Parsing errors while parsing CAT062: DataItemBits::getUnsigned : Wrong parameter.

Usage:
./asterix.exe --final -l -d config/asterix.ini -f sample_data/short_test.ff

Dataset:
The dataset contains Cat001, Cat002 Blocks, Cat034, Cat048, Cat062.
It is a file in final format.

0S:
Ubuntu 12.04 LTS 64 bit

ERROR (Many):
ERROR: Sep 13 15:44:45 2013 (asterixformat.cxx) DataItemBits::getUnsigned : Wrong parameter.

Possible cause:
There is a condition "numberOfBits > 32" in the beginning of this method. The associated XML file contains data items bigger than 32 bits.

wrong repetitive fixed length on I048/120

in the file asterix_cat048_1_21.xml, i would expect the fixed length of the repetitive section to be defined as 6, rather than 7, (bits 1-48) - similar to the way I034/070 is defined with length 2 (bits 1-16). am i misunderstanding the format?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.