cat010.h
Go to the documentation of this file.
1 /*
2  * libasterix
3  * Copyright [2020] SinoATC (http://www.sinoatc.com/).
4  * Copyright [2013-2020] Aerosys Corporation (http://www.aerosys.cn/).
5  * All Rights Reserved.
6  *
7  * NOTICE: All information contained herein is, and remains
8  * the property of SinoATC and its suppliers, if any.
9  * The intellectual and technical concepts contained herein
10  * are proprietary to Aerosys Corporation and its suppliers and may be
11  * covered by U.S. and Foreign Patents, patents in process,
12  * and are protected by trade secret or copyright law.
13  * Dissemination of this information or reproduction of this material
14  * is strictly forbidden unless prior written permission is obtained
15  * from SinoATC.
16  */
17 
27 #ifndef LIBASTERIX_CAT010_H
28 #define LIBASTERIX_CAT010_H
29 
30 #include "dataitem.h"
31 #include "datarecord.h"
32 #include "cat_generic.h"
33 #include "subfield.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 // Data Item
40 
43 
49 typedef enum _ast_surface_message_type_t
51 {
57 
60 
62 #define ast_dataitem_010_000_get_size ast_dataitem_message_type_get_size
63 
65 #define ast_dataitem_010_000_decode ast_dataitem_message_type_decode
66 
68 #define ast_dataitem_010_000_encode ast_dataitem_message_type_encode
69 
71 AST_API void ast_dataitem_010_000_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
72 
74 #define ast_dataitem_010_000_get_detail_html ast_dataitem_get_detail_html_dummy
75 
85 
87 #define ast_dataitem_010_010_get_size ast_dataitem_data_source_identifier_get_size
88 
90 #define ast_dataitem_010_010_decode ast_dataitem_data_source_identifier_decode
91 
93 #define ast_dataitem_010_010_encode ast_dataitem_data_source_identifier_encode
94 
96 #define ast_dataitem_010_010_get_summary ast_dataitem_data_source_identifier_get_summary
97 
99 #define ast_dataitem_010_010_get_detail_html ast_dataitem_data_source_identifier_get_detail_html
100 
109 typedef enum _ast_surface_target_type_t
111 {
121 
123 typedef enum _ast_loop_status_t
124 {
129 
131 typedef enum _ast_surface_target_t
132 {
138 
140 typedef struct _ast_dataitem_010_020_t
141 {
142  bool valid;
143 
146  int chain;
147  bool ground;
149  bool simulated;
150  bool test;
154  bool spi;
156 
158 #define ast_dataitem_010_020_get_size ast_dataitem_get_size_var_3_byte
159 
162 
164 //AST_API ast_dataitem_t ast_dataitem_010_020_encode(unsigned char* const buffer, const size_t buf_size, const ast_dataitem_ex_t xdi);
165 
167 AST_API void ast_dataitem_010_020_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
168 
170 AST_API void ast_dataitem_010_020_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
171 
175 typedef struct _ast_dataitem_010_040_t
177 {
178  bool valid;
179 
180  int raw_rho;
181  int raw_theta;
182 
183  double rho;
184  double theta;
186 
188 #define ast_dataitem_010_040_get_size ast_dataitem_get_size_fixed_4_byte
189 
192 
194 AST_API ast_dataitem_t ast_dataitem_010_040_encode(unsigned char* const buffer, const size_t buf_size, const ast_dataitem_ex_t xdi);
195 
197 AST_API void ast_dataitem_010_040_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
198 
200 AST_API void ast_dataitem_010_040_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
201 
209 typedef struct _ast_dataitem_010_042_t
211 {
212  bool valid;
213 
214  int raw_x;
215  int raw_y;
216 
217  int x;
218  int y;
220 
222 #define ast_dataitem_010_042_get_size ast_dataitem_get_size_fixed_4_byte
223 
226 
228 AST_API void ast_dataitem_010_042_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
229 
231 AST_API void ast_dataitem_010_042_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
232 
242 
244 #define ast_dataitem_010_060_get_size ast_dataitem_mode_3a_code_get_size
245 
247 #define ast_dataitem_010_060_decode ast_dataitem_mode_3a_code_decode
248 
250 #define ast_dataitem_010_060_encode ast_dataitem_mode_3a_code_encode
251 
253 #define ast_dataitem_010_060_get_summary ast_dataitem_mode_3a_code_get_summary
254 
256 #define ast_dataitem_010_060_get_detail_html ast_dataitem_mode_3a_code_get_detail_html
257 
267 
269 #define ast_dataitem_010_090_get_size ast_dataitem_mode_c_code_get_size
270 
272 #define ast_dataitem_010_090_decode ast_dataitem_mode_c_code_decode
273 
275 #define ast_dataitem_010_090_encode ast_dataitem_mode_c_code_encode
276 
278 #define ast_dataitem_010_090_get_summary ast_dataitem_mode_c_code_get_summary
279 
281 #define ast_dataitem_010_090_get_detail_html ast_dataitem_mode_c_code_get_detail_html
282 
290 typedef struct _ast_dataitem_010_131_t
292 {
293  bool valid;
294 
295  int pam;
297 
299 #define ast_dataitem_010_131_get_size ast_dataitem_get_size_fixed_1_byte
300 
303 
305 AST_API void ast_dataitem_010_131_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
306 
308 AST_API void ast_dataitem_010_131_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
309 
319 
321 #define ast_dataitem_010_140_get_size ast_dataitem_time_of_day_get_size
322 
324 #define ast_dataitem_010_140_decode ast_dataitem_time_of_day_decode
325 
327 #define ast_dataitem_010_140_encode ast_dataitem_time_of_day_encode
328 
330 #define ast_dataitem_010_140_get_summary ast_dataitem_time_of_day_get_summary
331 
333 #define ast_dataitem_010_140_get_detail_html ast_dataitem_time_of_day_get_detail_html
334 
344 
346 #define ast_dataitem_010_161_get_size ast_dataitem_track_number_get_size
347 
349 #define ast_dataitem_010_161_decode ast_dataitem_track_number_decode
350 
352 #define ast_dataitem_010_161_encode ast_dataitem_track_number_encode
353 
355 #define ast_dataitem_010_161_get_summary ast_dataitem_track_number_get_summary
356 
358 #define ast_dataitem_010_161_get_detail_html ast_dataitem_track_number_get_detail_html
359 
367 typedef enum _ast_sfc_track_coast_type_t
369 {
375 
377 typedef enum _ast_sfc_track_movement_type_t
378 {
384 
386 typedef enum _ast_sfc_track_doubt_type_t
387 {
396 
398 typedef enum _ast_sfc_track_merge_type_t
399 {
405 
407 typedef struct _ast_dataitem_010_170
408 {
409  bool valid;
410 
416  bool smoothed;
420  bool ghost;
422 
424 #define ast_dataitem_010_170_get_size ast_dataitem_get_size_var_3_byte
425 
428 
430 AST_API void ast_dataitem_010_170_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
431 
433 AST_API void ast_dataitem_010_170_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
434 
444 
446 #define ast_dataitem_010_202_get_size ast_dataitem_velocity_cartesian_get_size
447 
449 #define ast_dataitem_010_202_decode ast_dataitem_velocity_cartesian_decode
450 
452 #define ast_dataitem_010_202_get_summary ast_dataitem_velocity_cartesian_get_summary
453 
455 #define ast_dataitem_010_202_get_detail_html ast_dataitem_get_detail_html_dummy
456 
459 typedef struct _ast_dataitem_010_270
461 {
462  bool valid;
463 
464  int length;
466 
468 
472  double orientation;
473 
475 
476  int width;
477  bool width_valid;
479 
481 #define ast_dataitem_010_270_get_size ast_dataitem_get_size_var_3_byte
482 
485 
487 AST_API void ast_dataitem_010_270_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
488 
490 AST_API void ast_dataitem_010_270_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
491 
494 // Data Record
495 
498 
501 
504 
507 
510 
512 #define ast_datarecord_010_get_callsign 0
513 
515 #define ast_datarecord_010_get_icaoaddr 0
516 
518 #define ast_datarecord_010_get_coordinate 0
519 
522 
524 #define ast_datarecord_010_get_polarcoord 0
525 
528 
530 #define ast_datarecord_010_get_speed 0
531 
532 
533 #ifdef __cplusplus
534  }
535 #endif // extern "C"
536 
537 #endif //LIBASTERIX_CAT010_H
538 
539 // vim:set ft=c sw=2 sts=2 fenc=utf8:
Definition: cat010.h:380
Altitude.
Definition: type.h:111
Definition: cat010.h:403
ast_dataitem_data_source_identifier_t ast_dataitem_010_010_t
Item I010/010 - Data Source Identifier.
Definition: cat010.h:84
Data Item - Message Type.
Definition: cat_generic.h:52
Definition: cat010.h:382
Extracted dataitem.
Definition: dataitem.h:432
Heading.
Definition: type.h:137
ast_loop_status_t
Loop Status.
Definition: cat010.h:123
void ast_dataitem_010_042_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
Definition: cat010.h:113
double orientation
Raw orientation. LSB = 360/128 degree.
Definition: cat010.h:472
Implementation of Datarecord concept defined by ASTERIX.
Data Source Identifier (aka SAC/SIC)
Definition: type.h:35
ast_heading_t ast_datarecord_010_get_heading(const ast_datarecord_t dr)
Get heading function.
bool valid
Definition: cat010.h:178
Definition: cat010.h:115
ast_dataitem_010_131_t ast_dataitem_010_131_decode(const ast_dataitem_t di)
Decode function.
Data Item Itrack_number - Track Number.
Definition: cat_generic.h:719
ast_sacsic_t ast_datarecord_010_get_sacsic(const ast_datarecord_t dr)
Get SAC/SIC function.
ast_dataitem_010_020_t ast_dataitem_010_020_decode(const ast_dataitem_t di)
Decode function.
bool width_valid
Width. LSB = 1 meter.
Definition: cat010.h:477
ast_sfc_track_coast_type_t coast_type
Definition: cat010.h:413
#define AST_API
Definition: platform.h:63
void ast_dataitem_010_020_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Encode function.
Data Item - Data Source Identifier.
Definition: cat_generic.h:94
bool valid
Definition: cat010.h:212
ast_sfc_track_movement_type_t
Surface Track Movement Type.
Definition: cat010.h:377
ast_surface_target_t
Surface Target Type.
Definition: cat010.h:131
ast_sfc_track_merge_type_t
Surface Track Merge Type.
Definition: cat010.h:398
Data Item - Time of Day.
Definition: cat_generic.h:217
void ast_dataitem_010_042_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
Definition: cat010.h:394
int raw_y
Raw format as defined in doc, resolution 1 meter.
Definition: cat010.h:215
bool orientation_valid
Definition: cat010.h:474
void ast_dataitem_010_131_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
double rho
Rho, in meter.
Definition: cat010.h:183
Data Item I010/131 - Amplitude of Primary Plot.
Definition: cat010.h:291
Definition: cat010.h:393
Definition: cat010.h:381
Data Item I010/042 - Calculated Position in Cartesian Co-ordinates.
Definition: cat010.h:210
This file includes the common used data items shares by different categories.
bool ground
Definition: cat010.h:147
bool valid
Definition: cat010.h:293
bool valid
Definition: cat010.h:142
int chain
Definition: cat010.h:146
bool valid
Definition: cat010.h:409
ast_sfc_track_coast_type_t
Surface Track Cost Type.
Definition: cat010.h:368
Definition: cat010.h:126
ast_surface_target_type_t
Surface Target Surveillance Type.
Definition: cat010.h:110
Definition: type.h:66
Definition: cat010.h:52
void ast_dataitem_010_270_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
ast_surface_target_t target
Definition: cat010.h:153
void ast_dataitem_010_131_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
Data Item I010/040 - Measured Position in Polar Co-ordinates.
Definition: cat010.h:176
ast_msgtype_t ast_datarecord_010_get_msgtype(const ast_datarecord_t dr)
Get message type function.
bool adsb_differential_correction
Definition: cat010.h:145
int raw_theta
Raw format as defined in doc, resolution 360/2^16 degree.
Definition: cat010.h:181
bool initialisation
Definition: cat010.h:411
ast_sfc_track_doubt_type_t
Surface Track Doubt Type.
Definition: cat010.h:386
Definition: cat010.h:379
bool last_report
Definition: cat010.h:412
void ast_dataitem_010_000_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
bool fixed_transponder
Definition: cat010.h:151
ast_altitude_t ast_datarecord_010_get_flightlevel(const ast_datarecord_t dr)
Get flight level function.
int pam
Raw format as defined in doc, range 0..255.
Definition: cat010.h:295
ast_sfc_track_doubt_type_t doubt_type
Definition: cat010.h:418
ast_tracknum_t ast_datarecord_010_get_tracknum(const ast_datarecord_t dr)
Get track number function.
Definition: cat010.h:133
Data Item I010/270 - Target Size & Orientation.
Definition: cat010.h:460
Definition: cat010.h:391
Data Item - Mode-C Code.
Definition: cat_generic.h:559
bool simulated
Definition: cat010.h:149
int width
If orientation is valid.
Definition: cat010.h:476
ast_sfc_track_movement_type_t movement_type
Definition: cat010.h:417
ast_sfc_track_merge_type_t merge_type
Definition: cat010.h:419
ast_loop_status_t loop
Definition: cat010.h:152
Definition: cat010.h:402
void ast_dataitem_010_270_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
Definition: cat010.h:389
ast_dataitem_t ast_dataitem_010_040_encode(unsigned char *const buffer, const size_t buf_size, const ast_dataitem_ex_t xdi)
Encode function.
ast_dataitem_velocity_cartesian_t ast_dataitem_010_202_t
Data Item I010/202 - Calculated Track Velocity in Cartesian Coordinates.
Definition: cat010.h:443
int length
Definition: cat010.h:464
bool ghost
Definition: cat010.h:420
Data Item I010/020 - Target Report Descriptor.
Definition: cat010.h:140
Squawk (aka Mode-3/A Code)
Definition: type.h:80
ast_dataitem_message_type_t ast_dataitem_010_000_t
Data Item I010/000 - Message Type.
Definition: cat010.h:59
Data Item - Calculated Track Velocity in Cartesian Coordinates.
Definition: cat_generic.h:420
int raw_orientation
If length is valid.
Definition: cat010.h:467
Implementation of Dataitem concept defined by ASTERIX.
ast_dataitem_mode_3a_code_t ast_dataitem_010_060_t
Data Item I010/060 - Mode-3/A Code in Octal Representation.
Definition: cat010.h:241
bool length_valid
Length. LSB = 1 meter.
Definition: cat010.h:465
int raw_rho
Raw format as defined in doc, resolution 1 meter.
Definition: cat010.h:180
bool smoothed
Definition: cat010.h:416
int y
y in meter
Definition: cat010.h:218
Definition: cat010.h:401
Definition: cat010.h:372
double theta
Theta, in degree.
Definition: cat010.h:184
Definition: cat010.h:388
ast_surface_message_type_t
Surface message type.
Definition: cat010.h:50
Dataitem.
Definition: dataitem.h:421
bool h_manoeuvre
Definition: cat010.h:414
Data Item - Mode-3/A Code in Octal Representation.
Definition: cat_generic.h:475
ast_dataitem_track_number_t ast_dataitem_010_161_t
Data Item I010/161 - Track Number.
Definition: cat010.h:343
ast_dataitem_time_of_day_t ast_dataitem_010_140_t
Data Item I010/140 - Time of Day.
Definition: cat010.h:318
void ast_dataitem_010_040_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
Definition: cat010.h:55
Definition: cat010.h:134
ast_dataitem_type_t
Definition of data item id in each category.
Definition: dataitem.h:67
ast_timeofday_t ast_datarecord_010_get_timeofday(const ast_datarecord_t dr)
Get time of day function.
Time of day.
Definition: type.h:43
bool valid
Definition: cat010.h:462
ast_squawk_t ast_datarecord_010_get_squawk(const ast_datarecord_t dr)
Get Mode-3/A code function.
void ast_dataitem_010_040_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
bool projection_applied
Definition: cat010.h:415
bool mlat_corrupted_replies
Definition: cat010.h:148
Definition: cat010.h:125
void ast_dataitem_010_170_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
ast_dataitem_010_170_t ast_dataitem_010_170_decode(const ast_dataitem_t di)
Decode function.
Datarecord.
Definition: datarecord.h:41
int raw_x
Raw format as defined in doc, resolution 1 meter.
Definition: cat010.h:214
Definition: cat010.h:135
ast_dataitem_010_040_t ast_dataitem_010_040_decode(const ast_dataitem_t di)
Decode function.
bool test
Definition: cat010.h:150
void ast_dataitem_010_170_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
bool spi
Definition: cat010.h:154
ast_dataitem_mode_c_code_t ast_dataitem_010_090_t
Data Item I010/090 - Flight Level in Binary Representation.
Definition: cat010.h:266
Definition: cat010.h:127
ast_dataitem_010_270_t ast_dataitem_010_270_decode(const ast_dataitem_t di)
Decode function.
void ast_dataitem_010_020_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
Definition: cat010.h:136
Definition: cat010.h:114
Definition: cat010.h:118
ast_dataitem_010_042_t ast_dataitem_010_042_decode(const ast_dataitem_t di)
Decode function.
Definition: cat010.h:116
ast_surface_target_type_t type
Definition: cat010.h:144
Data Item I010/170 - Track Status.
Definition: cat010.h:407
Definition: cat010.h:117
Implementation of Subfield concept defined by ASTERIX.
int x
x in meter
Definition: cat010.h:217
Track Number.
Definition: type.h:73
Definition: cat010.h:119
Definition: cat010.h:112
const char * ast_dataitem_010_get_name(const ast_dataitem_type_t type)
Get name function.