Data record for radar video transmission. More...

Data Structures | |
| struct | ast_datarecord_240_t |
| Data Record I240 - Radar Video Transmission. More... | |
| struct | ast_videovector_t |
| Fully decoded video vector of a CAT240 data record. More... | |
Macros | |
| #define | ast_datarecord_240_get_tracknum 0 |
| Get track number function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_squawk 0 |
| Get Mode-3/A code function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_callsign 0 |
| Get callsign function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_icaoaddr 0 |
| Get ICAO 24-bit address function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_coordinate 0 |
| Get coordinate function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_flightlevel 0 |
| Get flight level function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_polarcoord 0 |
| Get polar coordinate function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_heading 0 |
| Get heading function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_speed 0 |
| Get speed function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_selaltitude 0 |
| Get selected altitude function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_cartesianvel 0 |
| Get cartesian velocity function (not applicable for CAT240). | |
| #define | ast_datarecord_240_get_vrate 0 |
| Get vertical rate function (not applicable for CAT240). | |
Functions | |
| ast_datarecord_240_t | ast_datarecord_240_disassemble (const ast_datarecord_t dr) |
| Disassemble CAT240 data record. | |
| ast_videovector_t | ast_datarecord_240_get_vector (const ast_datarecord_240_t dr, unsigned int *amplitude_buffer, const size_t amplitude_buffer_size) |
| Get the fully decoded video vector of a CAT240 data record. | |
| ast_sacsic_t | ast_datarecord_240_get_sacsic (const ast_datarecord_t dr) |
| Get SAC/SIC from CAT240 data record. | |
| ast_timeofday_t | ast_datarecord_240_get_timeofday (const ast_datarecord_t dr) |
| Get time of day from CAT240 data record. | |
| ast_msgtype_t | ast_datarecord_240_get_msgtype (const ast_datarecord_t dr) |
| Get message type from CAT240 data record. | |
Data record for radar video transmission.
| #define ast_datarecord_240_get_callsign 0 |
Get callsign function (not applicable for CAT240).
| #define ast_datarecord_240_get_cartesianvel 0 |
Get cartesian velocity function (not applicable for CAT240).
| #define ast_datarecord_240_get_coordinate 0 |
Get coordinate function (not applicable for CAT240).
| #define ast_datarecord_240_get_flightlevel 0 |
Get flight level function (not applicable for CAT240).
| #define ast_datarecord_240_get_heading 0 |
Get heading function (not applicable for CAT240).
| #define ast_datarecord_240_get_icaoaddr 0 |
Get ICAO 24-bit address function (not applicable for CAT240).
| #define ast_datarecord_240_get_polarcoord 0 |
Get polar coordinate function (not applicable for CAT240).
| #define ast_datarecord_240_get_selaltitude 0 |
Get selected altitude function (not applicable for CAT240).
| #define ast_datarecord_240_get_speed 0 |
Get speed function (not applicable for CAT240).
| #define ast_datarecord_240_get_squawk 0 |
Get Mode-3/A code function (not applicable for CAT240).
| #define ast_datarecord_240_get_tracknum 0 |
Get track number function (not applicable for CAT240).
| #define ast_datarecord_240_get_vrate 0 |
Get vertical rate function (not applicable for CAT240).
Video vector error codes.
The error code tells the upper layer application why a video vector could not be decoded.
| ast_datarecord_240_t ast_datarecord_240_disassemble | ( | const ast_datarecord_t | dr | ) |
Disassemble CAT240 data record.
| dr | Data record |
| ast_msgtype_t ast_datarecord_240_get_msgtype | ( | const ast_datarecord_t | dr | ) |
Get message type from CAT240 data record.
| dr | Data record |
| ast_sacsic_t ast_datarecord_240_get_sacsic | ( | const ast_datarecord_t | dr | ) |
Get SAC/SIC from CAT240 data record.
| dr | Data record |
| ast_timeofday_t ast_datarecord_240_get_timeofday | ( | const ast_datarecord_t | dr | ) |
Get time of day from CAT240 data record.
| dr | Data record |
| ast_videovector_t ast_datarecord_240_get_vector | ( | const ast_datarecord_240_t | dr, |
| unsigned int * | amplitude_buffer, | ||
| const size_t | amplitude_buffer_size ) |
Get the fully decoded video vector of a CAT240 data record.
The function decodes the video block into one amplitude value per cell so that the upper layer application does not need to know CAT240 details. Cells are unpacked MSB-first according to the I240/048 resolution; empty cells are reported with amplitude 0 (dense representation).
The required buffer size is known before unpacking: geometrically n_cells = video_size * 8 / bits, with video_size from the video block item present in the record (I240/050, I240/051 or I240/052) and bits from the I240/048 resolution. When I240/049 is present, its NB_VB / NB_CELLS counters are authoritative and n_cells may be smaller than the geometric value when the block carries trailing padding; sizing the buffer by the geometric value is always safe. When amplitude_buffer is NULL or too small, the function returns AST_VIDEOVECTOR_ERR_BUFFER_TOO_SMALL with n_cells set to the required number of unsigned int entries.
The amplitudes member points into the caller-provided buffer, which stays owned by the caller. The video block items are zero-copy views into the source data block: if a video block item is present but damaged (truncated, or I240/052 REP over 254), the decoded item struct is invalid with video_size set to the REP-claimed size and video == NULL; a fully zeroed struct means the item is absent.
| dr | Disassembled CAT240 data record |
| amplitude_buffer | Caller-provided amplitude buffer of at least n_cells entries |
| amplitude_buffer_size | Number of unsigned int entries in amplitude_buffer |