cat008.h
Go to the documentation of this file.
1/*
2 * $COPYRIGHT-BEGIN$
3 * libasterix
4 * Copyright [2013-2026] SinoATC <http://www.sinoatc.com>.
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 SinoATC 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 * $COPYRIGHT-END$
17 */
18
29
30#ifndef LIBASTERIX_CAT008_H
31#define LIBASTERIX_CAT008_H
32
33#include "dataitem.h"
34#include "datarecord.h"
35#include "cat_generic.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
92
93
94// Data Item
95
98
121
132
135
137#define ast_dataitem_008_000_get_size ast_dataitem_message_type_get_size
138
140#define ast_dataitem_008_000_decode ast_dataitem_message_type_decode
141
143#define ast_dataitem_008_000_encode ast_dataitem_message_type_encode
144
146AST_API void ast_dataitem_008_000_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
147
149#define ast_dataitem_008_000_get_detail_html ast_dataitem_get_detail_html_dummy
150 /* end of group di_008_000 */
152
153
169
172
174#define ast_dataitem_008_010_get_size ast_dataitem_data_source_identifier_get_size
175
177#define ast_dataitem_008_010_decode ast_dataitem_data_source_identifier_decode
178
180#define ast_dataitem_008_010_encode ast_dataitem_data_source_identifier_encode
181
183#define ast_dataitem_008_010_get_summary ast_dataitem_data_source_identifier_get_summary
184
186#define ast_dataitem_008_010_get_detail_html ast_dataitem_data_source_identifier_get_detail_html
187 /* end of group di_008_010 */
189
190
223
225typedef struct _ast_dataitem_008_020_t
226{
227 bool valid;
228
230 unsigned int intensity;
231 unsigned int shading;
232
233 bool test;
234 bool error;
236
238#define ast_dataitem_008_020_get_size ast_dataitem_get_size_var_2_byte
239
242
244AST_API void ast_dataitem_008_020_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
245
247AST_API void ast_dataitem_008_020_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
248 /* end of group di_008_020 */
250
251
274
276#define AST_WEATHER_MAX_VECTORS 255
277
279typedef struct _ast_weather_polar_vector_t
280{
281 unsigned int start_range;
282 unsigned int end_range;
283 unsigned int azimuth_raw;
284 double azimuth;
286
288typedef struct _ast_dataitem_008_034_t
289{
290 bool valid;
291
292 unsigned int n_vectors;
295
297#define ast_dataitem_008_034_get_size ast_dataitem_get_size_rep_4_byte
298
301
303AST_API void ast_dataitem_008_034_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
304
306AST_API void ast_dataitem_008_034_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
307 /* end of group di_008_034 */
309
310
333
335typedef struct _ast_weather_cartesian_vector_t
336{
337 int x;
338 int y;
339 unsigned int length;
341
343typedef struct _ast_dataitem_008_036_t
344{
345 bool valid;
346
347 unsigned int n_vectors;
350
352#define ast_dataitem_008_036_get_size ast_dataitem_get_size_rep_3_byte
353
356
358AST_API void ast_dataitem_008_036_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
359
361AST_API void ast_dataitem_008_036_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
362 /* end of group di_008_036 */
364
365
389
391typedef struct _ast_weather_segment_vector_t
392{
393 int x1;
394 int y1;
395 int x2;
396 int y2;
398
400typedef struct _ast_dataitem_008_038_t
401{
402 bool valid;
403
404 unsigned int n_vectors;
407
409#define ast_dataitem_008_038_get_size ast_dataitem_get_size_rep_4_byte
410
413
415AST_API void ast_dataitem_008_038_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
416
418AST_API void ast_dataitem_008_038_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
419 /* end of group di_008_038 */
421
422
443
452
454typedef struct _ast_dataitem_008_040_t
455{
456 bool valid;
457
459 unsigned int intensity;
461 unsigned int serial_number;
463
465#define ast_dataitem_008_040_get_size ast_dataitem_get_size_fixed_2_byte
466
469
471AST_API void ast_dataitem_008_040_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
472
474AST_API void ast_dataitem_008_040_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
475 /* end of group di_008_040 */
477
478
500
502#define AST_WEATHER_MAX_CONTOUR_POINTS 255
503
505typedef struct _ast_weather_contour_point_t
506{
507 int x;
508 int y;
510
512typedef struct _ast_dataitem_008_050_t
513{
514 bool valid;
515
516 unsigned int n_points;
519
521#define ast_dataitem_008_050_get_size ast_dataitem_get_size_rep_2_byte
522
525
527AST_API void ast_dataitem_008_050_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
528
530AST_API void ast_dataitem_008_050_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
531 /* end of group di_008_050 */
533
534
555
558
560#define ast_dataitem_008_090_get_size ast_dataitem_time_of_day_get_size
561
563#define ast_dataitem_008_090_decode ast_dataitem_time_of_day_decode
564
566#define ast_dataitem_008_090_encode ast_dataitem_time_of_day_encode
567
569#define ast_dataitem_008_090_get_summary ast_dataitem_time_of_day_get_summary
570
572#define ast_dataitem_008_090_get_detail_html ast_dataitem_time_of_day_get_detail_html
573 /* end of group di_008_090 */
575
576
598
600#define AST_WEATHER_MAX_PSTATUS_EXTENTS 8
601
603typedef struct _ast_dataitem_008_100_t
604{
605 bool valid;
606
608 unsigned int reduction;
609 unsigned int parameters;
610
611 unsigned int n_extents;
614
616AST_API size_t ast_dataitem_008_100_get_size(const unsigned char* buffer, const size_t bufsize);
617
620
622AST_API void ast_dataitem_008_100_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
623
625AST_API void ast_dataitem_008_100_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
626 /* end of group di_008_100 */
628
629
645
647typedef struct _ast_dataitem_008_110_t
648{
649 bool valid;
650
651 unsigned char bytes[2];
653
655#define ast_dataitem_008_110_get_size ast_dataitem_get_size_var_2_byte
656
659
661#define ast_dataitem_008_110_get_summary ast_dataitem_binary_data_get_summary
662
664AST_API void ast_dataitem_008_110_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
665 /* end of group di_008_110 */
667
668
683
685typedef struct _ast_dataitem_008_120_t
686{
687 bool valid;
688
689 unsigned int number;
691
693#define ast_dataitem_008_120_get_size ast_dataitem_get_size_fixed_2_byte
694
697
699AST_API void ast_dataitem_008_120_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
700
702#define ast_dataitem_008_120_get_detail_html ast_dataitem_get_detail_html_dummy
703 /* end of group di_008_120 */
705
706
718
720#define ast_dataitem_008_SPF_get_size ast_dataitem_special_purpose_field_get_size
721
723#define ast_dataitem_008_SPF_get_summary ast_dataitem_special_purpose_field_get_summary
724
726#define ast_dataitem_008_SPF_get_detail_html ast_dataitem_special_purpose_field_get_detail_html
727 /* end of group di_008_SPF */
729
730
742
744#define ast_dataitem_008_RFS_get_size ast_dataitem_random_field_sequencing_get_size
745
747#define ast_dataitem_008_RFS_get_summary ast_dataitem_random_field_sequencing_get_summary
748
750#define ast_dataitem_008_RFS_get_detail_html ast_dataitem_random_field_sequencing_get_detail_html
751 /* end of group di_008_RFS */
753
754
765
784
791 /* end of group dr_008 */
793
794
795#ifdef __cplusplus
796 }
797#endif // extern "C"
798
799#endif //LIBASTERIX_CAT008_H
800
801// vim:set ft=c.doxygen sw=2 sts=2 fenc=utf8:
const char * ast_dataitem_008_get_name(const ast_dataitem_type_t type)
Get name function.
ASTERIX generic data items shared by multiple categories.
ASTERIX data item.
ASTERIX data record.
void ast_dataitem_008_000_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function for I008/000.
ast_weather_message_type_t
Weather Message Type.
Definition cat008.h:124
ast_dataitem_message_type_t ast_dataitem_008_000_t
Data Item I008/000 - Message Type.
Definition cat008.h:134
@ AST_WEATHER_MESSAGE_EOP
End of picture.
Definition cat008.h:130
@ AST_WEATHER_MESSAGE_CONTOUR
Contour record.
Definition cat008.h:127
@ AST_WEATHER_MESSAGE_CARTESIAN_PL
Cartesian vector of start point/length.
Definition cat008.h:126
@ AST_WEATHER_MESSAGE_POLAR
Polar vector.
Definition cat008.h:125
@ AST_WEATHER_MESSAGE_SOP
Start of picture.
Definition cat008.h:129
@ AST_WEATHER_MESSAGE_CARTESIAN_PP
Cartesian start point and end point vector.
Definition cat008.h:128
ast_dataitem_data_source_identifier_t ast_dataitem_008_010_t
Data Item I008/010 - Data Source Identifier.
Definition cat008.h:171
ast_dataitem_008_020_t ast_dataitem_008_020_decode(const ast_dataitem_t di)
Decode function for I008/020.
void ast_dataitem_008_020_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function for I008/020.
void ast_dataitem_008_020_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function for I008/020.
ast_dataitem_008_034_t ast_dataitem_008_034_decode(const ast_dataitem_t di)
Decode function for I008/034.
void ast_dataitem_008_034_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function for I008/034.
#define AST_WEATHER_MAX_VECTORS
Maximum number of vectors in a repetitive data item (REP is one octet).
Definition cat008.h:276
void ast_dataitem_008_034_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function for I008/034.
void ast_dataitem_008_036_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function for I008/036.
void ast_dataitem_008_036_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function for I008/036.
ast_dataitem_008_036_t ast_dataitem_008_036_decode(const ast_dataitem_t di)
Decode function for I008/036.
void ast_dataitem_008_038_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function for I008/038.
void ast_dataitem_008_038_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function for I008/038.
ast_dataitem_008_038_t ast_dataitem_008_038_decode(const ast_dataitem_t di)
Decode function for I008/038.
void ast_dataitem_008_040_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function for I008/040.
ast_weather_contour_record_position_t
Position of the record within a contour (FST/LST).
Definition cat008.h:446
ast_dataitem_008_040_t ast_dataitem_008_040_decode(const ast_dataitem_t di)
Decode function for I008/040.
void ast_dataitem_008_040_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function for I008/040.
@ AST_WEATHER_CONTOUR_FIRST
First record of a contour of at least two records.
Definition cat008.h:449
@ AST_WEATHER_CONTOUR_LAST
Last record of a contour of at least two records.
Definition cat008.h:448
@ AST_WEATHER_CONTOUR_FIRST_AND_ONLY
First and only record, fully defining a contour.
Definition cat008.h:450
@ AST_WEATHER_CONTOUR_INTERMEDIATE
Intermediate record of a contour.
Definition cat008.h:447
ast_dataitem_008_050_t ast_dataitem_008_050_decode(const ast_dataitem_t di)
Decode function for I008/050.
void ast_dataitem_008_050_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function for I008/050.
void ast_dataitem_008_050_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function for I008/050.
#define AST_WEATHER_MAX_CONTOUR_POINTS
Maximum number of contour points in a repetitive data item (REP is one octet).
Definition cat008.h:502
ast_dataitem_time_of_day_t ast_dataitem_008_090_t
Data Item I008/090 - Time of Day.
Definition cat008.h:557
#define AST_WEATHER_MAX_PSTATUS_EXTENTS
Maximum number of one-octet extents of I008/100.
Definition cat008.h:600
void ast_dataitem_008_100_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function for I008/100.
size_t ast_dataitem_008_100_get_size(const unsigned char *buffer, const size_t bufsize)
Get size function for I008/100.
ast_dataitem_008_100_t ast_dataitem_008_100_decode(const ast_dataitem_t di)
Decode function for I008/100.
void ast_dataitem_008_100_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function for I008/100.
void ast_dataitem_008_110_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function for I008/110.
ast_dataitem_008_110_t ast_dataitem_008_110_decode(const ast_dataitem_t di)
Decode function for I008/110.
void ast_dataitem_008_120_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function for I008/120.
ast_dataitem_008_120_t ast_dataitem_008_120_decode(const ast_dataitem_t di)
Decode function for I008/120.
ast_dataitem_type_t
Definition of data item type in each category.
Definition dataitem.h:86
ast_datarecord_008_t ast_datarecord_008_disassemble(const ast_datarecord_t dr)
Disassemble a CAT008 data record into its components.
#define AST_API
Definition platform.h:63
Data Item I008/020 - Vector Qualifier.
Definition cat008.h:226
unsigned int shading
Shading orientation (0 to 7), heading = 22.5 deg x value.
Definition cat008.h:231
bool system_coordinates
Coordinate system: false = Local, true = System.
Definition cat008.h:229
bool test
Test vector (first extent).
Definition cat008.h:233
bool error
Error condition encountered (first extent).
Definition cat008.h:234
bool valid
Data item validity flag.
Definition cat008.h:227
unsigned int intensity
Precipitation intensity level (0 to 7).
Definition cat008.h:230
Data Item I008/034 - Sequence of Polar Vectors in SPF Notation.
Definition cat008.h:289
bool valid
Data item validity flag.
Definition cat008.h:290
ast_weather_polar_vector_t vectors[255]
Vector array.
Definition cat008.h:293
unsigned int n_vectors
Number of weather vectors.
Definition cat008.h:292
Data Item I008/036 - Sequence of Cartesian Vectors in SPF Notation.
Definition cat008.h:344
ast_weather_cartesian_vector_t vectors[255]
Vector array.
Definition cat008.h:348
unsigned int n_vectors
Number of weather vectors.
Definition cat008.h:347
bool valid
Data item validity flag.
Definition cat008.h:345
Data Item I008/038 - Sequence of Weather Vectors in SPF Notation.
Definition cat008.h:401
unsigned int n_vectors
Number of weather vectors.
Definition cat008.h:404
ast_weather_segment_vector_t vectors[255]
Vector array.
Definition cat008.h:405
bool valid
Data item validity flag.
Definition cat008.h:402
Data Item I008/040 - Contour Identifier.
Definition cat008.h:455
unsigned int intensity
Precipitation intensity level (0 to 7).
Definition cat008.h:459
bool system_coordinates
Coordinate system: false = Local, true = System.
Definition cat008.h:458
unsigned int serial_number
Contour serial number.
Definition cat008.h:461
bool valid
Data item validity flag.
Definition cat008.h:456
ast_weather_contour_record_position_t position
Position of the record within the contour.
Definition cat008.h:460
Data Item I008/050 - Sequence of Contour Points in SPF Notation.
Definition cat008.h:513
bool valid
Data item validity flag.
Definition cat008.h:514
unsigned int n_points
Number of consecutive points.
Definition cat008.h:516
ast_weather_contour_point_t points[255]
Point array.
Definition cat008.h:517
Data Item I008/100 - Processing Status.
Definition cat008.h:604
int scale_factor
Scaling factor f (-16 to 15, 2's complement).
Definition cat008.h:607
unsigned int reduction
Current reduction stage in use (0 = Normal operation).
Definition cat008.h:608
unsigned int n_extents
Number of extent octets.
Definition cat008.h:611
bool valid
Data item validity flag.
Definition cat008.h:605
unsigned char extents[8]
Extent octets (application dependent).
Definition cat008.h:612
unsigned int parameters
Processing parameters (application dependent).
Definition cat008.h:609
Data Item I008/110 - Station Configuration Status.
Definition cat008.h:648
bool valid
Data item validity flag.
Definition cat008.h:649
unsigned char bytes[2]
Octets as transmitted (FX bits included).
Definition cat008.h:651
Data Item I008/120 - Total Number of Items Constituting One Weather Picture.
Definition cat008.h:686
bool valid
Data item validity flag.
Definition cat008.h:687
unsigned int number
Total number of items.
Definition cat008.h:689
Data Item - Data Source Identifier.
Definition cat_generic.h:133
Data Item - Message Type.
Definition cat_generic.h:80
Dataitem.
Definition dataitem.h:515
Data Item - Time of Day.
Definition cat_generic.h:282
Data Record I008 - Monoradar Derived Weather Information.
Definition cat008.h:768
ast_dataitem_008_036_t dataitem_008_036
I008/036: Sequence of Cartesian Vectors in SPF Notation.
Definition cat008.h:775
ast_dataitem_008_100_t dataitem_008_100
I008/100: Processing Status.
Definition cat008.h:780
ast_dataitem_008_040_t dataitem_008_040
I008/040: Contour Identifier.
Definition cat008.h:777
ast_dataitem_008_038_t dataitem_008_038
I008/038: Sequence of Weather Vectors in SPF Notation.
Definition cat008.h:776
ast_dataitem_008_120_t dataitem_008_120
I008/120: Total Number of Items Constituting One Weather Picture.
Definition cat008.h:782
bool valid
Validity flag.
Definition cat008.h:769
ast_dataitem_008_090_t dataitem_008_090
I008/090: Time of Day.
Definition cat008.h:779
ast_dataitem_008_050_t dataitem_008_050
I008/050: Sequence of Contour Points in SPF Notation.
Definition cat008.h:778
ast_dataitem_008_110_t dataitem_008_110
I008/110: Station Configuration Status.
Definition cat008.h:781
ast_dataitem_008_010_t dataitem_008_010
I008/010: Data Source Identifier.
Definition cat008.h:772
ast_dataitem_008_020_t dataitem_008_020
I008/020: Vector Qualifier.
Definition cat008.h:773
ast_dataitem_008_034_t dataitem_008_034
I008/034: Sequence of Polar Vectors in SPF Notation.
Definition cat008.h:774
ast_dataitem_008_000_t dataitem_008_000
I008/000: Message Type.
Definition cat008.h:771
Datarecord.
Definition datarecord.h:61
Weather vector in start point/length representation (I008/036 element).
Definition cat008.h:336
int x
X-component raw value (2's complement), LSB = 2^(-6+f) NM.
Definition cat008.h:337
int y
Y-component raw value (2's complement), LSB = 2^(-6+f) NM.
Definition cat008.h:338
unsigned int length
Length raw value, LSB = 2^(-6+f) NM.
Definition cat008.h:339
Contour point in cartesian coordinates (I008/050 element).
Definition cat008.h:506
int x
X-coordinate raw value (2's complement), LSB = 2^(-6+f) NM.
Definition cat008.h:507
int y
Y-coordinate raw value (2's complement), LSB = 2^(-6+f) NM.
Definition cat008.h:508
Weather vector in local polar coordinates (I008/034 element).
Definition cat008.h:280
unsigned int end_range
End range raw value, LSB = 2^(-7+f) NM.
Definition cat008.h:282
double azimuth
Azimuth in degrees.
Definition cat008.h:284
unsigned int start_range
Start range raw value, LSB = 2^(-7+f) NM.
Definition cat008.h:281
unsigned int azimuth_raw
Azimuth raw value, LSB = 360 deg / 2^16.
Definition cat008.h:283
Weather vector in start point/end point representation (I008/038 element).
Definition cat008.h:392
int x1
Start point X-component raw value (2's complement), LSB = 2^(-6+f) NM.
Definition cat008.h:393
int y2
End point Y-component raw value (2's complement), LSB = 2^(-6+f) NM.
Definition cat008.h:396
int y1
Start point Y-component raw value (2's complement), LSB = 2^(-6+f) NM.
Definition cat008.h:394
int x2
End point X-component raw value (2's complement), LSB = 2^(-6+f) NM.
Definition cat008.h:395