Skip to content

Commit

Permalink
Merge pull request #163 from CroatiaControlLtd/version_2_7_0
Browse files Browse the repository at this point in the history
Version 2 7 0
  • Loading branch information
dsalantic committed Oct 2, 2020
2 parents 639344f + 401470f commit 3c49ff6
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 68 deletions.
8 changes: 6 additions & 2 deletions HISTORY
Expand Up @@ -220,9 +220,13 @@ Issue #153 Problem decoding Runway Designation in I062/390
Issue #154 Scale does not match the spec for I062/500, subfield # 3
Issue #155 Scale does not match the spec for I062/500, subfield # 5

Development build
2.7.0 (python_v0.6.0)
Issue #159 Track Angle Rate should be encoded as signed in I021/165
Issue #160 Typos in bit value descriptions in asterix_cat021_2_4.xml
Issue #161 CAT021 - problem decoding Military Extended Squitter in Reserved Expansion Field
Issue #104 problem with Data Item I048/030, Warning/Error Conditions and Target Classification
Issue #156 Duplicate JSON keys for I062/510 Composed Track Number
Issue #156 Duplicate JSON keys for I062/510 Composed Track Number
Issue #162 No JSON array for I048/030 and I062/510 if only one extent is present in the data item
Warning: with this update following items are changed in JSON and Python format
001/030, 001/130, 001/210, 002/050, 002/060, 002/080, 008/100, 008/110, 019/553, 020/030, 021/110, 023/110, 025/100, 048/030, 062/510, 252/240
Elements in those items (all variable items with only one extent) are now presented as list of dictionaries.
2 changes: 1 addition & 1 deletion asterix/version.py
@@ -1 +1 @@
__version__ = '0.5.16'
__version__ = '0.6.0'
14 changes: 7 additions & 7 deletions install/sample_output/cat_001_002_json.txt
@@ -1,8 +1,8 @@
{"id":1,"length":23,"crc":"C3141406","timestamp":45826414,"hexdata":"01001AF7C619C9A00EB2767F189408AA42D8033405C8800D400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":2,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3762},"I040":{"RHO":236.9921875,"THETA":34.5629883},"I200":{"CalcGS":487.9600000,"CalcHdg":93.9990234},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"1464"},"I090":{"V":0,"G":0,"ModeC":370.0000000},"I141":{"Time":256.1015625},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":{"Qty":7,"FX":0}}}
{"id":2,"length":23,"crc":"906485F6","timestamp":45826414,"hexdata":"01001AF7C619C9B00F7561EC1A14077EB5550E5205508014400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":3,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3957},"I040":{"RHO":195.8437500,"THETA":36.6723633},"I200":{"CalcGS":421.9600000,"CalcHdg":254.9981689},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"7122"},"I090":{"V":0,"G":0,"ModeC":340.0000000},"I141":{"Time":256.1562500},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":{"Qty":7,"FX":0}}}
{"id":3,"length":23,"crc":"646E354E","timestamp":45826414,"hexdata":"01001AF7C619C9B00DCA69DE1A7C07F011110E3006188016400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":3,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3530},"I040":{"RHO":211.7343750,"THETA":37.2436523},"I200":{"CalcGS":447.0400000,"CalcHdg":23.9996338},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"7060"},"I090":{"V":0,"G":0,"ModeC":390.0000000},"I141":{"Time":256.1718750},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":{"Qty":7,"FX":0}}}
{"id":1,"length":23,"crc":"7F3A77FF","timestamp":45826414,"hexdata":"01001AF7C619C9B00D685C881CE008424FA4004A04D88022400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":3,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3432},"I040":{"RHO":185.0625000,"THETA":40.6054688},"I200":{"CalcGS":465.0800000,"CalcHdg":111.9946289},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"0112"},"I090":{"V":0,"G":0,"ModeC":310.0000000},"I141":{"Time":256.2656250},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":{"Qty":7,"FX":0}}}
{"id":1,"length":23,"crc":"C3141406","timestamp":45826414,"hexdata":"01001AF7C619C9A00EB2767F189408AA42D8033405C8800D400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":2,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3762},"I040":{"RHO":236.9921875,"THETA":34.5629883},"I200":{"CalcGS":487.9600000,"CalcHdg":93.9990234},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"1464"},"I090":{"V":0,"G":0,"ModeC":370.0000000},"I141":{"Time":256.1015625},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":[{"Qty":7,"FX":0}]}}
{"id":2,"length":23,"crc":"906485F6","timestamp":45826414,"hexdata":"01001AF7C619C9B00F7561EC1A14077EB5550E5205508014400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":3,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3957},"I040":{"RHO":195.8437500,"THETA":36.6723633},"I200":{"CalcGS":421.9600000,"CalcHdg":254.9981689},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"7122"},"I090":{"V":0,"G":0,"ModeC":340.0000000},"I141":{"Time":256.1562500},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":[{"Qty":7,"FX":0}]}}
{"id":3,"length":23,"crc":"646E354E","timestamp":45826414,"hexdata":"01001AF7C619C9B00DCA69DE1A7C07F011110E3006188016400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":3,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3530},"I040":{"RHO":211.7343750,"THETA":37.2436523},"I200":{"CalcGS":447.0400000,"CalcHdg":23.9996338},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"7060"},"I090":{"V":0,"G":0,"ModeC":390.0000000},"I141":{"Time":256.1718750},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":[{"Qty":7,"FX":0}]}}
{"id":1,"length":23,"crc":"7F3A77FF","timestamp":45826414,"hexdata":"01001AF7C619C9B00D685C881CE008424FA4004A04D88022400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":3,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3432},"I040":{"RHO":185.0625000,"THETA":40.6054688},"I200":{"CalcGS":465.0800000,"CalcHdg":111.9946289},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"0112"},"I090":{"V":0,"G":0,"ModeC":310.0000000},"I141":{"Time":256.2656250},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":[{"Qty":7,"FX":0}]}}
{"id":1,"length":8,"crc":"F99F71EB","timestamp":45826414,"hexdata":"02000BF019C90250598117","CAT002":{"I010":{"SAC":25,"SIC":201},"I000":{"type":2},"I020":{"Azi":112.5000000},"I030":{"ToD":45826.1796875}}}
{"id":1,"length":23,"crc":"87B79637","timestamp":45826414,"hexdata":"01001AF7C619C9B00CE173571E28081DD1100AC405A08028400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":3,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3297},"I040":{"RHO":230.6796875,"THETA":42.4072266},"I200":{"CalcGS":456.9400000,"CalcHdg":293.9941406},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"5304"},"I090":{"V":0,"G":0,"ModeC":360.0000000},"I141":{"Time":256.3125000},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":{"Qty":7,"FX":0}}}
{"id":1,"length":23,"crc":"0651441B","timestamp":45826414,"hexdata":"01001AF7C619C9A00C10514C212C05DCE2D7059E025A8038400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":2,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3088},"I040":{"RHO":162.5937500,"THETA":46.6479492},"I200":{"CalcGS":330.0000000,"CalcHdg":318.9935303},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"2636"},"I090":{"V":0,"G":0,"ModeC":150.5000000},"I141":{"Time":256.4375000},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":{"Qty":7,"FX":0}}}
{"id":1,"length":23,"crc":"BB67C462","timestamp":45826414,"hexdata":"01001AF7C619C9B00F0D37FE21C80755D1C605A505A0803B400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":3,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3853},"I040":{"RHO":111.9843750,"THETA":47.5048828},"I200":{"CalcGS":412.9400000,"CalcHdg":294.9938965},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"2645"},"I090":{"V":0,"G":0,"ModeC":360.0000000},"I141":{"Time":256.4609375},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":{"Qty":7,"FX":0}}}
{"id":1,"length":23,"crc":"87B79637","timestamp":45826414,"hexdata":"01001AF7C619C9B00CE173571E28081DD1100AC405A08028400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":3,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3297},"I040":{"RHO":230.6796875,"THETA":42.4072266},"I200":{"CalcGS":456.9400000,"CalcHdg":293.9941406},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"5304"},"I090":{"V":0,"G":0,"ModeC":360.0000000},"I141":{"Time":256.3125000},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":[{"Qty":7,"FX":0}]}}
{"id":1,"length":23,"crc":"0651441B","timestamp":45826414,"hexdata":"01001AF7C619C9A00C10514C212C05DCE2D7059E025A8038400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":2,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3088},"I040":{"RHO":162.5937500,"THETA":46.6479492},"I200":{"CalcGS":330.0000000,"CalcHdg":318.9935303},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"2636"},"I090":{"V":0,"G":0,"ModeC":150.5000000},"I141":{"Time":256.4375000},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":[{"Qty":7,"FX":0}]}}
{"id":1,"length":23,"crc":"BB67C462","timestamp":45826414,"hexdata":"01001AF7C619C9B00F0D37FE21C80755D1C605A505A0803B400E","CAT001":{"I010":{"SAC":25,"SIC":201},"I020":{"TYP":1,"SIM":0,"SSRPSR":3,"ANT":0,"SPI":0,"RAB":0,"FX":0},"I161":{"tpn":3853},"I040":{"RHO":111.9843750,"THETA":47.5048828},"I200":{"CalcGS":412.9400000,"CalcHdg":294.9938965},"I070":{"V":0,"G":0,"L":0,"spare":0,"Mode3A":"2645"},"I090":{"V":0,"G":0,"ModeC":360.0000000},"I141":{"Time":256.4609375},"I170":{"CON":0,"RAD":1,"MAN":0,"DOU":0,"RDPC":0,"spare":0,"GHO":0,"FX":0},"I210":[{"Qty":7,"FX":0}]}}
28 changes: 14 additions & 14 deletions install/sample_output/cat_001_002_jsonh.txt
Expand Up @@ -44,9 +44,9 @@
"spare":0,
"GHO":0,
"FX":0},
"I210":{
"I210":[{
"Qty":7,
"FX":0}}},
"FX":0}]}},
{"id":2,
"length":23,
"crc":"906485F6",
Expand Down Expand Up @@ -93,9 +93,9 @@
"spare":0,
"GHO":0,
"FX":0},
"I210":{
"I210":[{
"Qty":7,
"FX":0}}},
"FX":0}]}},
{"id":3,
"length":23,
"crc":"646E354E",
Expand Down Expand Up @@ -142,9 +142,9 @@
"spare":0,
"GHO":0,
"FX":0},
"I210":{
"I210":[{
"Qty":7,
"FX":0}}},
"FX":0}]}},
{"id":1,
"length":23,
"crc":"7F3A77FF",
Expand Down Expand Up @@ -191,9 +191,9 @@
"spare":0,
"GHO":0,
"FX":0},
"I210":{
"I210":[{
"Qty":7,
"FX":0}}},
"FX":0}]}},
{"id":1,
"length":8,
"crc":"F99F71EB",
Expand Down Expand Up @@ -255,9 +255,9 @@
"spare":0,
"GHO":0,
"FX":0},
"I210":{
"I210":[{
"Qty":7,
"FX":0}}},
"FX":0}]}},
{"id":1,
"length":23,
"crc":"0651441B",
Expand Down Expand Up @@ -304,9 +304,9 @@
"spare":0,
"GHO":0,
"FX":0},
"I210":{
"I210":[{
"Qty":7,
"FX":0}}},
"FX":0}]}},
{"id":1,
"length":23,
"crc":"BB67C462",
Expand Down Expand Up @@ -353,6 +353,6 @@
"spare":0,
"GHO":0,
"FX":0},
"I210":{
"I210":[{
"Qty":7,
"FX":0}}},
"FX":0}]}},
31 changes: 10 additions & 21 deletions install/sample_output/filter.txt
Expand Up @@ -1093,7 +1093,7 @@ CAT021:I271:POA Position Offset App
CAT021:I271:CDTI_S Cockpit Display of Traffic Information Surface
CAT021:I271:B2_low Class B2 transmit power less than 70 Watts
CAT021:I271:RAS Receiving ATC Services
CAT021:I271:IDENT Setting of 'IDENT'-switch
CAT021:I271:IDENT Setting of IDENT-switch
CAT021:I271:FX FX Extension indicator
CAT021:I271:LW Length and width of the aircraft
CAT021:I271:spare Spare bits set to zero
Expand Down Expand Up @@ -1128,16 +1128,16 @@ CAT021:IRE:spare Spare bits set to z
CAT021:IRE:SelHHRD SelH Horizontal Reference Direction
CAT021:IRE:Stat Selected Heading Status
CAT021:IRE:SelH Selected Heading
CAT021:IRE:AP Autopilot engaged
CAT021:IRE:VN VNAV Active (Vertical Navigation)
CAT021:IRE:AH Altitude Hold engaged
CAT021:IRE:AM Approach Mode active
CAT021:IRE:AP Autopilot
CAT021:IRE:VN VNAV (Vertical Navigation)
CAT021:IRE:AH Altitude Hold
CAT021:IRE:AM Approach Mode
CAT021:IRE:spare Spare bits set to zero
CAT021:IRE:GAO GPS Antenna Offset
CAT021:IRE:STP Aircraft stopped
CAT021:IRE:HTS Heading/Ground Track
CAT021:IRE:HTT Heading/Ground data
CAT021:IRE:SVGHRD SVG Horizontal Reference Direction
CAT021:IRE:HRD SGV Horizontal Reference Direction
CAT021:IRE:GSS Ground Speed
CAT021:IRE:FX Extension indicator
CAT021:IRE:HGT Heading/Ground Track information
Expand All @@ -1146,22 +1146,14 @@ CAT021:IRE:ES 1090 ES IN capabili
CAT021:IRE:UAT UAT capability
CAT021:IRE:spare Spare bits set to zero
CAT021:IRE:FX Extension indicator
CAT021:IRE:TNH True North Magnetic Heading
CAT021:IRE:SUM Mode 5 Summary
CAT021:IRE:PNO Mode 5 PIN/National Origin
CAT021:IRE:EM1 Extended Mode 1 Code in Octal Representation
CAT021:IRE:XP X Pulse Presence
CAT021:IRE:FOM Figure of Merit
CAT021:IRE:M2 Mode 2 Code
CAT021:IRE:spare Spare bit, set to “0”
CAT021:IRE:FX Extension indicator
CAT021:IRE:TNH True North Heading
CAT021:IRE:M5 Mode 5 interrogation
CAT021:IRE:ID Authenticated Mode 5 ID
CAT021:IRE:DA Authenticated Mode 5 Data reply or Report
CAT021:IRE:M1 Mode 1 code
CAT021:IRE:M2 Mode 2 code
CAT021:IRE:M3 Mode 3 code
CAT021:IRE:MC Flightlevel
CAT021:IRE:MC Flight Level
CAT021:IRE:PO Position from Mode 5 Report
CAT021:IRE:spare Spare bits set to 0
CAT021:IRE:PIN PIN Code
Expand All @@ -1185,7 +1177,7 @@ CAT021:IRE:V Code validated
CAT021:IRE:spare Spare bits set to 0
CAT021:IRE:L Mode 2 code from transponder or smoothed
CAT021:IRE:spare Spare bits set to 0
CAT021:IRE:M2CO Mode-2 code in octal representation
CAT021:IRE:M2 Mode-2 code in octal representation
CAT021:ISP:SPval
CAT025:I000:Typ Report Type
CAT025:I000:RG Report Generation
Expand Down Expand Up @@ -1509,7 +1501,7 @@ CAT048:I020:ME ME
CAT048:I020:MI MI
CAT048:I020:FOEFRI FOE/FRI
CAT048:I020:FX FX
CAT048:I030:WE First warning/error condition value
CAT048:I030:WE Warning/error condition value
CAT048:I030:FX FX
CAT048:I040:RHO
CAT048:I040:THETA
Expand Down Expand Up @@ -2097,9 +2089,6 @@ CAT062:I500:ARC_Acc Rate Of Climb/Desce
CAT062:I510:SDPSUID SDPS Unit Identification
CAT062:I510:STN System Track Number
CAT062:I510:FX
CAT062:I510:SDPSUID SDPS Unit Identification
CAT062:I510:STN System Track Number
CAT062:I510:FX
CAT062:IRE:SAC SAC of the sensor contributing to the track in the current update cycle
CAT062:IRE:SIC SIC of the sensor contributing to the track in the current update cycle
CAT062:IRE:spare spare bits set to 0
Expand Down
28 changes: 7 additions & 21 deletions src/asterix/DataItemFormatVariable.cpp
Expand Up @@ -83,16 +83,10 @@ bool DataItemFormatVariable::getText(std::string &strResult, std::string &strHea

std::list<DataItemFormat *>::iterator it;
bool lastPart = false;
bool listOfSubItems = false;

// Calculate length of available subitem extents
int subitemsLength = 0;
for (it = m_lSubItems.begin(); it != m_lSubItems.end(); ++it) {
DataItemFormatFixed *dip = (DataItemFormatFixed *) (*it);
subitemsLength += dip->getLength();
}
// If there are more bytes then subitems, put extents to list
if (subitemsLength < nLength)
// If Variable item definition contains 1 Fixed subitem, show items in list
bool listOfSubItems = false;
if (m_lSubItems.size() == 1)
listOfSubItems = true;

it = m_lSubItems.begin();
Expand Down Expand Up @@ -286,21 +280,13 @@ PyObject* DataItemFormatVariable::getObject(unsigned char* pData, long nLength,
PyObject* p = NULL;
std::list<DataItemFormat*>::iterator it;
bool lastPart = false;
bool listOfSubItems = false;

// Calculate length of available subitem extents
int subitemsLength = 0;
for (it = m_lSubItems.begin(); it != m_lSubItems.end(); ++it) {
DataItemFormatFixed *dip = (DataItemFormatFixed *) (*it);
subitemsLength += dip->getLength();
}
// If there are more bytes then subitems, put extents to list
if (subitemsLength < nLength) {
// If Variable item definition contains 1 Fixed subitem, show items in list
bool listOfSubItems = false;
if (m_lSubItems.size() == 1) {
listOfSubItems = true;
p = PyList_New(0);
listOfSubItems = true;
}
else {
} else {
// otherwise put directly to dictionary
p = PyDict_New();
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/version.h
Expand Up @@ -26,7 +26,7 @@
#ifndef VERSION_H
#define VERSION_H

#define _VERSION 2.6.2
#define _VERSION_STR "2.6.2"
#define _VERSION 2.7.0
#define _VERSION_STR "2.7.0"

#endif

0 comments on commit 3c49ff6

Please sign in to comment.