cat010.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 
26 #ifndef LIBASTERIX_CAT010_H
27 #define LIBASTERIX_CAT010_H
28 
29 #include "dataitem.h"
30 #include "datarecord.h"
31 #include "cat_generic.h"
32 #include "subfield.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 // Data Item
39 
42 
48 typedef enum _ast_surface_message_type_t
50 {
56 
59 
61 #define ast_dataitem_010_000_get_size ast_dataitem_message_type_get_size
62 
64 #define ast_dataitem_010_000_decode ast_dataitem_message_type_decode
65 
67 #define ast_dataitem_010_000_encode ast_dataitem_message_type_encode
68 
70 AST_API void ast_dataitem_010_000_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
71 
73 #define ast_dataitem_010_000_get_detail_html ast_dataitem_get_detail_html_dummy
74 
84 
86 #define ast_dataitem_010_010_get_size ast_dataitem_data_source_identifier_get_size
87 
89 #define ast_dataitem_010_010_decode ast_dataitem_data_source_identifier_decode
90 
92 #define ast_dataitem_010_010_encode ast_dataitem_data_source_identifier_encode
93 
95 #define ast_dataitem_010_010_get_summary ast_dataitem_data_source_identifier_get_summary
96 
98 #define ast_dataitem_010_010_get_detail_html ast_dataitem_data_source_identifier_get_detail_html
99 
108 typedef enum _ast_surface_target_type_t
110 {
120 
122 typedef enum _ast_loop_status_t
123 {
128 
130 typedef enum _ast_surface_target_t
131 {
137 
139 typedef struct _ast_dataitem_010_020_t
140 {
141  bool valid;
142 
145  int chain;
146  bool ground;
148  bool simulated;
149  bool test;
153  bool spi;
155 
157 #define ast_dataitem_010_020_get_size ast_dataitem_get_size_var_3_byte
158 
161 
163 //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);
164 
166 AST_API void ast_dataitem_010_020_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
167 
169 AST_API void ast_dataitem_010_020_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
170 
174 typedef struct _ast_dataitem_010_040_t
176 {
177  bool valid;
178 
179  int raw_rho;
180  int raw_theta;
181 
182  double rho;
183  double theta;
185 
187 #define ast_dataitem_010_040_get_size ast_dataitem_get_size_fixed_4_byte
188 
191 
193 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);
194 
196 AST_API void ast_dataitem_010_040_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
197 
199 AST_API void ast_dataitem_010_040_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
200 
208 typedef struct _ast_dataitem_010_042_t
210 {
211  bool valid;
212 
213  int raw_x;
214  int raw_y;
215 
216  int x;
217  int y;
219 
221 #define ast_dataitem_010_042_get_size ast_dataitem_get_size_fixed_4_byte
222 
225 
227 AST_API void ast_dataitem_010_042_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
228 
230 AST_API void ast_dataitem_010_042_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
231 
241 
243 #define ast_dataitem_010_060_get_size ast_dataitem_mode_3a_code_get_size
244 
246 #define ast_dataitem_010_060_decode ast_dataitem_mode_3a_code_decode
247 
249 #define ast_dataitem_010_060_encode ast_dataitem_mode_3a_code_encode
250 
252 #define ast_dataitem_010_060_get_summary ast_dataitem_mode_3a_code_get_summary
253 
255 #define ast_dataitem_010_060_get_detail_html ast_dataitem_mode_3a_code_get_detail_html
256 
266 
268 #define ast_dataitem_010_090_get_size ast_dataitem_mode_c_code_get_size
269 
271 #define ast_dataitem_010_090_decode ast_dataitem_mode_c_code_decode
272 
274 #define ast_dataitem_010_090_encode ast_dataitem_mode_c_code_encode
275 
277 #define ast_dataitem_010_090_get_summary ast_dataitem_mode_c_code_get_summary
278 
280 #define ast_dataitem_010_090_get_detail_html ast_dataitem_mode_c_code_get_detail_html
281 
289 typedef struct _ast_dataitem_010_131_t
291 {
292  bool valid;
293 
294  int pam;
296 
298 #define ast_dataitem_010_131_get_size ast_dataitem_get_size_fixed_1_byte
299 
302 
304 AST_API void ast_dataitem_010_131_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
305 
307 AST_API void ast_dataitem_010_131_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
308 
318 
320 #define ast_dataitem_010_140_get_size ast_dataitem_time_of_day_get_size
321 
323 #define ast_dataitem_010_140_decode ast_dataitem_time_of_day_decode
324 
326 #define ast_dataitem_010_140_encode ast_dataitem_time_of_day_encode
327 
329 #define ast_dataitem_010_140_get_summary ast_dataitem_time_of_day_get_summary
330 
332 #define ast_dataitem_010_140_get_detail_html ast_dataitem_time_of_day_get_detail_html
333 
343 
345 #define ast_dataitem_010_161_get_size ast_dataitem_track_number_get_size
346 
348 #define ast_dataitem_010_161_decode ast_dataitem_track_number_decode
349 
351 #define ast_dataitem_010_161_encode ast_dataitem_track_number_encode
352 
354 #define ast_dataitem_010_161_get_summary ast_dataitem_track_number_get_summary
355 
357 #define ast_dataitem_010_161_get_detail_html ast_dataitem_track_number_get_detail_html
358 
366 typedef enum _ast_sfc_track_coast_type_t
368 {
374 
376 typedef enum _ast_sfc_track_movement_type_t
377 {
383 
385 typedef enum _ast_sfc_track_doubt_type_t
386 {
395 
397 typedef enum _ast_sfc_track_merge_type_t
398 {
404 
406 typedef struct _ast_dataitem_010_170
407 {
408  bool valid;
409 
415  bool smoothed;
419  bool ghost;
421 
423 #define ast_dataitem_010_170_get_size ast_dataitem_get_size_var_3_byte
424 
427 
429 AST_API void ast_dataitem_010_170_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
430 
432 AST_API void ast_dataitem_010_170_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
433 
443 
445 #define ast_dataitem_010_202_get_size ast_dataitem_velocity_cartesian_get_size
446 
448 #define ast_dataitem_010_202_decode ast_dataitem_velocity_cartesian_decode
449 
451 #define ast_dataitem_010_202_get_summary ast_dataitem_velocity_cartesian_get_summary
452 
454 #define ast_dataitem_010_202_get_detail_html ast_dataitem_get_detail_html_dummy
455 
458 typedef struct _ast_dataitem_010_270
460 {
461  bool valid;
462 
463  int length;
465 
467 
471  double orientation;
472 
474 
475  int width;
476  bool width_valid;
478 
480 #define ast_dataitem_010_270_get_size ast_dataitem_get_size_var_3_byte
481 
484 
486 AST_API void ast_dataitem_010_270_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
487 
489 AST_API void ast_dataitem_010_270_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
490 
493 // Data Record
494 
497 
500 
503 
506 
509 
511 #define ast_datarecord_010_get_callsign 0
512 
514 #define ast_datarecord_010_get_icaoaddr 0
515 
517 #define ast_datarecord_010_get_coordinate 0
518 
521 
523 #define ast_datarecord_010_get_polarcoord 0
524 
527 
529 #define ast_datarecord_010_get_speed 0
530 
531 
532 #ifdef __cplusplus
533  }
534 #endif // extern "C"
535 
536 #endif //LIBASTERIX_CAT010_H
537 
538 // vim:set ft=c sw=2 sts=2 fenc=utf8:
Definition: cat010.h:379
Altitude.
Definition: type.h:111
Definition: cat010.h:402
ast_dataitem_data_source_identifier_t ast_dataitem_010_010_t
Item I010/010 - Data Source Identifier.
Definition: cat010.h:83
Data Item - Message Type.
Definition: cat_generic.h:51
Definition: cat010.h:381
Extracted dataitem.
Definition: dataitem.h:433
Heading.
Definition: type.h:137
ast_loop_status_t
Loop Status.
Definition: cat010.h:122
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:112
double orientation
Raw orientation. LSB = 360/128 degree.
Definition: cat010.h:471
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:177
Definition: cat010.h:114
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:727
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:476
ast_sfc_track_coast_type_t coast_type
Definition: cat010.h:412
#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:93
bool valid
Definition: cat010.h:211
ast_sfc_track_movement_type_t
Surface Track Movement Type.
Definition: cat010.h:376
ast_surface_target_t
Surface Target Type.
Definition: cat010.h:130
ast_sfc_track_merge_type_t
Surface Track Merge Type.
Definition: cat010.h:397
Data Item - Time of Day.
Definition: cat_generic.h:219
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:393
int raw_y
Raw format as defined in doc, resolution 1 meter.
Definition: cat010.h:214
bool orientation_valid
Definition: cat010.h:473
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:182
Data Item I010/131 - Amplitude of Primary Plot.
Definition: cat010.h:290
Definition: cat010.h:392
Definition: cat010.h:380
Data Item I010/042 - Calculated Position in Cartesian Co-ordinates.
Definition: cat010.h:209
This file includes the common used data items shares by different categories.
bool ground
Definition: cat010.h:146
bool valid
Definition: cat010.h:292
bool valid
Definition: cat010.h:141
int chain
Definition: cat010.h:145
bool valid
Definition: cat010.h:408
ast_sfc_track_coast_type_t
Surface Track Cost Type.
Definition: cat010.h:367
Definition: cat010.h:125
ast_surface_target_type_t
Surface Target Surveillance Type.
Definition: cat010.h:109
Definition: type.h:66
Definition: cat010.h:51
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:152
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:175
ast_msgtype_t ast_datarecord_010_get_msgtype(const ast_datarecord_t dr)
Get message type function.
bool adsb_differential_correction
Definition: cat010.h:144
int raw_theta
Raw format as defined in doc, resolution 360/2^16 degree.
Definition: cat010.h:180
bool initialisation
Definition: cat010.h:410
ast_sfc_track_doubt_type_t
Surface Track Doubt Type.
Definition: cat010.h:385
Definition: cat010.h:378
bool last_report
Definition: cat010.h:411
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:150
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:294
ast_sfc_track_doubt_type_t doubt_type
Definition: cat010.h:417
ast_tracknum_t ast_datarecord_010_get_tracknum(const ast_datarecord_t dr)
Get track number function.
Definition: cat010.h:132
Data Item I010/270 - Target Size & Orientation.
Definition: cat010.h:459
Definition: cat010.h:390
Data Item - Mode-C Code.
Definition: cat_generic.h:562
bool simulated
Definition: cat010.h:148
int width
If orientation is valid.
Definition: cat010.h:475
ast_sfc_track_movement_type_t movement_type
Definition: cat010.h:416
ast_sfc_track_merge_type_t merge_type
Definition: cat010.h:418
ast_loop_status_t loop
Definition: cat010.h:151
Definition: cat010.h:401
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:388
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:442
int length
Definition: cat010.h:463
bool ghost
Definition: cat010.h:419
Data Item I010/020 - Target Report Descriptor.
Definition: cat010.h:139
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:58
Data Item - Calculated Track Velocity in Cartesian Coordinates.
Definition: cat_generic.h:423
int raw_orientation
If length is valid.
Definition: cat010.h:466
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:240
bool length_valid
Length. LSB = 1 meter.
Definition: cat010.h:464
int raw_rho
Raw format as defined in doc, resolution 1 meter.
Definition: cat010.h:179
bool smoothed
Definition: cat010.h:415
int y
y in meter
Definition: cat010.h:217
Definition: cat010.h:400
Definition: cat010.h:371
double theta
Theta, in degree.
Definition: cat010.h:183
Definition: cat010.h:387
ast_surface_message_type_t
Surface message type.
Definition: cat010.h:49
Dataitem.
Definition: dataitem.h:422
bool h_manoeuvre
Definition: cat010.h:413
Data Item - Mode-3/A Code in Octal Representation.
Definition: cat_generic.h:478
ast_dataitem_track_number_t ast_dataitem_010_161_t
Data Item I010/161 - Track Number.
Definition: cat010.h:342
ast_dataitem_time_of_day_t ast_dataitem_010_140_t
Data Item I010/140 - Time of Day.
Definition: cat010.h:317
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:54
Definition: cat010.h:133
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:461
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:414
bool mlat_corrupted_replies
Definition: cat010.h:147
Definition: cat010.h:124
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:40
int raw_x
Raw format as defined in doc, resolution 1 meter.
Definition: cat010.h:213
Definition: cat010.h:134
ast_dataitem_010_040_t ast_dataitem_010_040_decode(const ast_dataitem_t di)
Decode function.
bool test
Definition: cat010.h:149
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:153
ast_dataitem_mode_c_code_t ast_dataitem_010_090_t
Data Item I010/090 - Flight Level in Binary Representation.
Definition: cat010.h:265
Definition: cat010.h:126
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:135
Definition: cat010.h:113
Definition: cat010.h:117
ast_dataitem_010_042_t ast_dataitem_010_042_decode(const ast_dataitem_t di)
Decode function.
Definition: cat010.h:115
ast_surface_target_type_t type
Definition: cat010.h:143
Data Item I010/170 - Track Status.
Definition: cat010.h:406
Definition: cat010.h:116
Implementation of Subfield concept defined by ASTERIX.
int x
x in meter
Definition: cat010.h:216
Track Number.
Definition: type.h:73
Definition: cat010.h:118
Definition: cat010.h:111
const char * ast_dataitem_010_get_name(const ast_dataitem_type_t type)
Get name function.