cat020.h
Go to the documentation of this file.
1 /*
2  * libasterix
3  * Copyright [2013-2020] SinoATC <http://www.sinoatc.com>.
4  * All Rights Reserved.
5  *
6  * NOTICE: All information contained herein is, and remains
7  * the property of SinoATC and its suppliers, if any.
8  * The intellectual and technical concepts contained herein
9  * are proprietary to Aerosys Corporation and its suppliers and may be
10  * covered by U.S. and Foreign Patents, patents in process,
11  * and are protected by trade secret or copyright law.
12  * Dissemination of this information or reproduction of this material
13  * is strictly forbidden unless prior written permission is obtained
14  * from SinoATC.
15  */
16 
29 #ifndef LIBASTERIX_CAT020_H
30 #define LIBASTERIX_CAT020_H
31 
32 #include "datarecord.h"
33 #include "dataitem.h"
34 #include "cat_generic.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 // Data Item
41 
44 
51 #define ast_dataitem_020_010_get_size ast_dataitem_data_source_identifier_get_size
52 #define ast_dataitem_020_010_decode ast_dataitem_data_source_identifier_decode
53 #define ast_dataitem_020_010_encode ast_dataitem_data_source_identifier_encode
54 #define ast_dataitem_020_010_get_summary ast_dataitem_data_source_identifier_get_summary
55 #define ast_dataitem_020_010_get_detail_html ast_dataitem_data_source_identifier_get_detail_html
56 
65 typedef struct _ast_dataitem_020_020_t
67 {
68  bool valid;
69 
71  bool type_modes;
72  bool type_hf;
73  bool type_vdl4;
74  bool type_uat;
75  bool type_dme;
76  bool type_other;
77 
79  bool spi;
80  int chain;
81  bool ground;
83  bool simulated;
84  bool test;
86 
88 #define ast_dataitem_020_020_get_size ast_dataitem_get_size_var_2_byte
89 
92 
94 AST_API void ast_dataitem_020_020_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
95 
97 AST_API void ast_dataitem_020_020_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di);
98 
106 #define ast_dataitem_020_030_get_size ast_dataitem_get_size_var_2_byte
107 
117 #define ast_dataitem_020_041_get_size ast_dataitem_position_wgs84_get_size
118 #define ast_dataitem_020_041_decode ast_dataitem_position_wgs84_decode
119 #define ast_dataitem_020_041_get_summary ast_dataitem_position_wgs84_get_summary
120 #define ast_dataitem_020_041_get_detail_html ast_dataitem_position_wgs84_get_detail_html
121 
131 #define ast_dataitem_020_042_get_size ast_dataitem_position_cartesian_get_size
132 #define ast_dataitem_020_042_decode ast_dataitem_position_cartesian_decode
133 #define ast_dataitem_020_042_get_summary ast_dataitem_position_cartesian_get_summary
134 #define ast_dataitem_020_042_get_detail_html ast_dataitem_position_cartesian_get_detail_html
135 
144 #define ast_dataitem_020_050_get_size ast_dataitem_mode_2_code_get_size
145 
153 AST_API size_t ast_dataitem_020_055_get_size(const unsigned char* buffer, const size_t bufsize);
154 
163 #define ast_dataitem_020_070_get_size ast_dataitem_mode_3a_code_get_size
164 #define ast_dataitem_020_070_decode ast_dataitem_mode_3a_code_decode
165 #define ast_dataitem_020_070_encode ast_dataitem_mode_3a_code_encode
166 #define ast_dataitem_020_070_get_summary ast_dataitem_mode_3a_code_get_summary
167 #define ast_dataitem_020_070_get_detail_html ast_dataitem_mode_3a_code_get_detail_html
168 
178 #define ast_dataitem_020_090_get_size ast_dataitem_mode_c_code_get_size
179 #define ast_dataitem_020_090_decode ast_dataitem_mode_c_code_decode
180 #define ast_dataitem_020_090_encode ast_dataitem_mode_c_code_encode
181 #define ast_dataitem_020_090_get_summary ast_dataitem_mode_c_code_get_summary
182 #define ast_dataitem_020_090_get_detail_html ast_dataitem_mode_c_code_get_detail_html
183 
192 AST_API size_t ast_dataitem_020_100_get_size(const unsigned char* buffer, const size_t bufsize);
193 
203 #define ast_dataitem_020_105_get_size ast_dataitem_height_get_size
204 #define ast_dataitem_020_105_decode ast_dataitem_height_decode
205 #define ast_dataitem_020_105_get_summary ast_dataitem_height_get_summary
206 #define ast_dataitem_020_105_get_detail_html ast_dataitem_height_get_detail_html
207 
216 #define ast_dataitem_020_110_get_size ast_dataitem_height_get_size
217 #define ast_dataitem_020_110_decode ast_dataitem_height_decode
218 #define ast_dataitem_020_110_get_summary ast_dataitem_height_get_summary
219 #define ast_dataitem_020_110_get_detail_html ast_dataitem_height_get_detail_html
220 
230 #define ast_dataitem_020_140_get_size ast_dataitem_time_of_day_get_size
231 #define ast_dataitem_020_140_decode ast_dataitem_time_of_day_decode
232 #define ast_dataitem_020_140_encode ast_dataitem_time_of_day_encode
233 #define ast_dataitem_020_140_get_summary ast_dataitem_time_of_day_get_summary
234 #define ast_dataitem_020_140_get_detail_html ast_dataitem_time_of_day_get_detail_html
235 
245 #define ast_dataitem_020_161_get_size ast_dataitem_track_number_get_size
246 #define ast_dataitem_020_161_decode ast_dataitem_track_number_decode
247 
249 #define ast_dataitem_020_161_encode ast_dataitem_track_number_encode
250 
251 #define ast_dataitem_020_161_get_summary ast_dataitem_track_number_get_summary
252 #define ast_dataitem_020_161_get_detail_html ast_dataitem_track_number_get_detail_html
253 
262 typedef enum _ast_mlat_track_vertical_maneuver_t
264 {
270 
272 typedef struct _ast_dataitem_020_170_t
273 {
274  bool valid;
275 
278  bool coast;
281  bool smoothed;
282  bool ghost;
284 
286 #define ast_dataitem_020_170_get_size ast_dataitem_get_size_var_2_byte
287 
290 
292 AST_API void ast_dataitem_020_170_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
293 
295 AST_API void ast_dataitem_020_170_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
296 
306 #define ast_dataitem_020_202_get_size ast_dataitem_velocity_cartesian_get_size
307 #define ast_dataitem_020_202_decode ast_dataitem_velocity_cartesian_decode
308 #define ast_dataitem_020_202_get_summary ast_dataitem_velocity_cartesian_get_summary
309 #define ast_dataitem_020_202_get_detail_html ast_dataitem_get_detail_html_dummy
310 
314 #define ast_dataitem_020_210_get_size ast_dataitem_get_size_fixed_2_byte
316 
317 
324 #define ast_dataitem_020_220_get_size ast_dataitem_target_address_get_size
325 #define ast_dataitem_020_220_decode ast_dataitem_target_address_decode
326 #define ast_dataitem_020_220_encode ast_dataitem_target_address_encode
327 #define ast_dataitem_020_220_get_summary ast_dataitem_target_address_get_summary
328 #define ast_dataitem_020_220_get_detail_html ast_dataitem_target_address_get_detail_html
329 
338 typedef enum _ast_mlat_comm_capbility_t
340 {
348 
350 typedef enum _ast_mlat_flight_status_t
351 {
361 
363 typedef struct _ast_dataitem_020_230_t
364 {
365  bool valid;
366 
369 
373 
374  char b1a;
375  char b1b;
377 
379 #define ast_dataitem_020_230_get_size ast_dataitem_get_size_fixed_2_byte
380 
383 
385 AST_API void ast_dataitem_020_230_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
386 
388 AST_API void ast_dataitem_020_230_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
389 
399 #define ast_dataitem_020_245_get_size ast_dataitem_target_id_get_size
400 #define ast_dataitem_020_245_decode ast_dataitem_target_id_decode
401 #define ast_dataitem_020_245_get_summary ast_dataitem_target_id_get_summary
402 #define ast_dataitem_020_245_get_detail_html ast_dataitem_target_id_get_detail_html
403 
413 #define ast_dataitem_020_250_get_size ast_dataitem_modes_mb_get_size
414 #define ast_dataitem_020_250_decode ast_dataitem_modes_mb_decode
415 #define ast_dataitem_020_250_get_summary ast_dataitem_modes_mb_get_summary
416 #define ast_dataitem_020_250_get_detail_html ast_dataitem_modes_mb_get_detail_html
417 
421 #define ast_dataitem_020_260_get_size ast_dataitem_get_size_fixed_7_byte
423 
424 
426 #define ast_dataitem_020_300_get_size ast_dataitem_get_size_fixed_1_byte
427 
428 
430 #define ast_dataitem_020_310_get_size ast_dataitem_get_size_fixed_1_byte
431 
432 
438 #define AST_MAX_MLAT_RECEIVERS 256
439 
441 typedef struct _ast_dataitem_020_400_t
442 {
443  bool valid;
444 
445  int n_total;
447 
448  bool receivers[AST_MAX_MLAT_RECEIVERS];
450 
452 #define ast_dataitem_020_400_get_size ast_dataitem_get_size_rep_1_byte
453 
456 
458 AST_API void ast_dataitem_020_400_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
459 
461 AST_API void ast_dataitem_020_400_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
462 
471 typedef struct _ast_dataitem_020_500_t
473 {
474  bool valid;
475 
479 
480  int dop_x;
481  int dop_y;
482  int dop_xy;
483 
484  int sdp_x;
485  int sdp_y;
486  int sdp_xy;
487 
488  int sdh;
490 
492 AST_API size_t ast_dataitem_020_500_get_size(const unsigned char* buffer, const size_t bufsize);
493 
496 
498 AST_API void ast_dataitem_020_500_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
499 
501 AST_API void ast_dataitem_020_500_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
502 
510 #define ast_dataitem_020_REF_get_size ast_dataitem_reserved_expansion_field_get_size
512 
514 //ast_dataitem_020_REF_t ast_dataitem_020_REF_decode(const ast_dataitem_t di);
515 
517 #define ast_dataitem_020_REF_get_summary ast_dataitem_reserved_expansion_field_get_summary;
518 
520 #define ast_dataitem_020_REF_get_detail_html ast_dataitem_reserved_expansion_field_get_detail_html;
521 
524 // Data Record
525 
528 
531 
534 
537 
540 
543 
546 
549 
552 
554 #define ast_datarecord_020_get_polarcoord 0
555 
557 #define ast_datarecord_020_get_heading 0
558 
560 #define ast_datarecord_020_get_speed 0
561 
567 typedef struct _ast_datarecord_020_t
569 {
570  bool valid;
571 
590 
592 
595 
598 #ifdef __cplusplus
599  }
600 #endif // extern "C"
601 
602 #endif //LIBASTERIX_CAT020_H
603 
604 // vim:set ft=c.doxygen sw=2 sts=2 fenc=utf8:
ast_dataitem_020_230_t ast_dataitem_020_230_decode(const ast_dataitem_t di)
Decode function.
bool test
Definition: cat020.h:84
Definition: cat020.h:354
ast_dataitem_020_400_t ast_dataitem_020_400_decode(const ast_dataitem_t di)
Decode function.
Altitude.
Definition: type.h:111
ast_dataitem_020_170_t ast_dataitem_020_170_decode(const ast_dataitem_t di)
Decode function.
int dop_x
Definition: cat020.h:480
bool coast
Definition: cat020.h:278
ast_dataitem_020_500_t dataitem_020_500
Definition: cat020.h:589
ast_dataitem_020_020_t ast_dataitem_020_020_decode(const ast_dataitem_t di)
Decode function.
bool valid
Definition: cat020.h:365
bool ground
Definition: cat020.h:81
ast_sacsic_t ast_datarecord_020_get_sacsic(const ast_datarecord_t dr)
Get SAC/SIC function.
void ast_dataitem_020_170_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
bool h_maneuvre
Definition: cat020.h:280
bool valid
Definition: cat020.h:274
Implementation of Datarecord concept defined by ASTERIX.
Data Source Identifier (aka SAC/SIC)
Definition: type.h:35
size_t ast_dataitem_020_500_get_size(const unsigned char *buffer, const size_t bufsize)
Get size funciton.
ast_dataitem_020_230_t dataitem_020_230
Definition: cat020.h:585
ast_dataitem_020_245_t dataitem_020_245
Definition: cat020.h:586
Data Item Itrack_number - Track Number.
Definition: cat_generic.h:727
void ast_dataitem_020_500_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
ast_dataitem_track_number_t ast_dataitem_020_161_t
Definition: cat020.h:244
Data Item I020/400 - Contributing Receivers.
Definition: cat020.h:441
ast_dataitem_mode_c_code_t ast_dataitem_020_090_t
Definition: cat020.h:177
bool corrupted_reply
Definition: cat020.h:82
ast_tracknum_t ast_datarecord_020_get_tracknum(const ast_datarecord_t dr)
Get track number function.
ast_mlat_track_vertical_maneuver_t v_maneuvre
Definition: cat020.h:279
bool simulated
Definition: cat020.h:83
Definition: cat020.h:267
int sdp_y
Definition: cat020.h:485
Definition: cat020.h:346
Data Item - Position in Cartesian Coordinates.
Definition: cat_generic.h:384
ast_mlat_flight_status_t
MLAT flight status.
Definition: cat020.h:350
#define AST_API
Definition: platform.h:63
int dop_xy
Definition: cat020.h:482
Data Item - Data Source Identifier.
Definition: cat_generic.h:93
bool ghost
Definition: cat020.h:282
ast_dataitem_020_042_t dataitem_020_042
Definition: cat020.h:575
void ast_dataitem_020_230_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary funciton.
ast_dataitem_data_source_identifier_t ast_dataitem_020_010_t
Definition: cat020.h:50
bool altitude_cap
Definition: cat020.h:371
Data Item - Time of Day.
Definition: cat_generic.h:219
ast_mlat_comm_capbility_t
MLAT communication capbility.
Definition: cat020.h:339
ast_dataitem_height_t ast_dataitem_020_110_t
Definition: cat020.h:215
void ast_dataitem_020_500_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
Definition: cat020.h:265
Definition: cat020.h:344
This file includes the common used data items shares by different categories.
Data Record I020 - MLT Messages.
Definition: cat020.h:568
Data Item - Mode S MB Data.
Definition: cat_generic.h:965
Definition: cat020.h:268
Definition: cat020.h:343
#define AST_MAX_MLAT_RECEIVERS
Definition: cat020.h:438
Definition: type.h:66
int dop_y
Definition: cat020.h:481
bool type_non_modes
Definition: cat020.h:70
ast_mlat_comm_capbility_t comm_cap
Definition: cat020.h:367
void ast_dataitem_020_400_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
ast_squawk_t ast_datarecord_020_get_squawk(const ast_datarecord_t dr)
Get Mode-3/A code function.
Data Item - Target Identification.
Definition: cat_generic.h:893
ast_dataitem_020_105_t dataitem_020_105
Definition: cat020.h:578
Definition: cat020.h:359
ast_dataitem_time_of_day_t ast_dataitem_020_140_t
Definition: cat020.h:229
int chain
Definition: cat020.h:80
Definition: cat020.h:266
void ast_dataitem_020_170_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
Data Item - Mode-C Code.
Definition: cat_generic.h:562
bool initiation
Definition: cat020.h:276
bool type_vdl4
Definition: cat020.h:73
int n_total
Definition: cat020.h:445
bool last_report
Definition: cat020.h:277
void ast_dataitem_020_020_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
ast_coordinate_t ast_datarecord_020_get_coordinate(const ast_datarecord_t dr)
Get coordinate function.
ast_dataitem_target_address_t ast_dataitem_020_220_t
Definition: cat020.h:323
Data Item I020/020 - Target Report Descriptor.
Definition: cat020.h:66
ast_dataitem_020_110_t dataitem_020_110
Definition: cat020.h:579
ast_dataitem_modes_mb_t ast_dataitem_020_250_t
Definition: cat020.h:412
bool dop_existing
Definition: cat020.h:476
Data Item - Position in WGS84 Coordinates.
Definition: cat_generic.h:343
void ast_dataitem_020_400_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
ast_dataitem_020_070_t dataitem_020_070
Definition: cat020.h:576
ast_mlat_track_vertical_maneuver_t
MLAT track vertical maneuver status.
Definition: cat020.h:263
char b1b
Definition: cat020.h:375
Squawk (aka Mode-3/A Code)
Definition: type.h:80
ast_mlat_flight_status_t flight_status
Definition: cat020.h:368
Data Item - Calculated Track Velocity in Cartesian Coordinates.
Definition: cat_generic.h:423
Implementation of Dataitem concept defined by ASTERIX.
ast_dataitem_020_500_t ast_dataitem_020_500_decode(const ast_dataitem_t di)
Decode function.
ast_dataitem_velocity_cartesian_t ast_dataitem_020_202_t
Definition: cat020.h:305
bool valid
Definition: cat020.h:443
bool type_other
Definition: cat020.h:76
Data Item - Target Address.
Definition: cat_generic.h:807
Definition: cat020.h:342
ast_dataitem_020_161_t dataitem_020_161
Definition: cat020.h:581
char b1a
Definition: cat020.h:374
ast_dataitem_020_220_t dataitem_020_220
Definition: cat020.h:584
bool spi
Definition: cat020.h:79
Definition: cat020.h:356
void ast_dataitem_020_020_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get Summary function.
Definition: cat020.h:353
Dataitem.
Definition: dataitem.h:422
ast_dataitem_020_090_t dataitem_020_090
Definition: cat020.h:577
ast_dataitem_height_t ast_dataitem_020_105_t
Definition: cat020.h:202
ast_msgtype_t ast_datarecord_020_get_msgtype(const ast_datarecord_t dr)
Get message type function.
Definition: cat020.h:358
Definition: cat020.h:341
Data Item - Mode-3/A Code in Octal Representation.
Definition: cat_generic.h:478
bool type_dme
Definition: cat020.h:75
ast_datarecord_020_t ast_datarecord_020_disassemble(const ast_datarecord_t dr)
Disassemble function.
bool type_uat
Definition: cat020.h:74
ast_callsign_t ast_datarecord_020_get_callsign(const ast_datarecord_t dr)
Get callsign function.
bool sdp_existing
Definition: cat020.h:477
Callsign.
Definition: type.h:89
ast_dataitem_type_t
Definition of data item id in each category.
Definition: dataitem.h:67
size_t ast_dataitem_020_055_get_size(const unsigned char *buffer, const size_t bufsize)
bool valid
Definition: cat020.h:68
bool type_modes
Definition: cat020.h:71
ast_dataitem_position_cartesian_t ast_dataitem_020_042_t
Definition: cat020.h:130
Data Item I020/500 - Position Accuracy.
Definition: cat020.h:472
WGS-84 2D Coordinate.
Definition: type.h:103
Time of day.
Definition: type.h:43
int sdp_x
Definition: cat020.h:484
ast_dataitem_020_170_t dataitem_020_170
Definition: cat020.h:582
ast_dataitem_target_id_t ast_dataitem_020_245_t
Definition: cat020.h:398
bool sdh_existing
Definition: cat020.h:478
Definition: cat020.h:357
Datarecord.
Definition: datarecord.h:40
ast_dataitem_020_400_t dataitem_020_400
Definition: cat020.h:588
ast_dataitem_020_250_t dataitem_020_250
Definition: cat020.h:587
bool valid
Definition: cat020.h:474
ast_timeofday_t ast_datarecord_020_get_timeofday(const ast_datarecord_t dr)
Get time of day function.
Definition: cat020.h:355
ast_dataitem_020_020_t dataitem_020_020
Definition: cat020.h:573
ast_dataitem_position_wgs84_t ast_dataitem_020_041_t
Definition: cat020.h:116
Data Item I020/170 - Track Status.
Definition: cat020.h:272
Definition: cat020.h:345
int n_contributing
Definition: cat020.h:446
bool type_hf
Definition: cat020.h:72
ast_dataitem_mode_3a_code_t ast_dataitem_020_070_t
Definition: cat020.h:162
ast_dataitem_020_140_t dataitem_020_140
Definition: cat020.h:580
int sdh
Definition: cat020.h:488
int sdp_xy
Definition: cat020.h:486
ast_dataitem_020_202_t dataitem_020_202
Definition: cat020.h:583
bool mode_s_cap
Definition: cat020.h:370
ast_altitude_t ast_datarecord_020_get_flightlevel(const ast_datarecord_t dr)
Get flight level function.
ast_dataitem_020_010_t dataitem_020_010
Definition: cat020.h:572
Definition: cat020.h:352
Data Item - Height.
Definition: cat_generic.h:644
bool identification_cap
Definition: cat020.h:372
bool smoothed
Definition: cat020.h:281
ICAO 24-bit Address.
Definition: type.h:96
Data Item I020/230 - Communications/ACAS Capability and Flight Status.
Definition: cat020.h:363
const char * ast_dataitem_020_get_name(const ast_dataitem_type_t type)
Get name function.
ast_icaoaddr_t ast_datarecord_020_get_icaoaddr(const ast_datarecord_t dr)
Get ICAO 24-bit address function.
bool fixed_transponder
Definition: cat020.h:78
ast_dataitem_020_041_t dataitem_020_041
Definition: cat020.h:574
Track Number.
Definition: type.h:73
void ast_dataitem_020_230_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
size_t ast_dataitem_020_100_get_size(const unsigned char *buffer, const size_t bufsize)
bool valid
Definition: cat020.h:570