bds.h File Reference

Mode-S transponder Binary Data Source (BDS) registers. More...

#include <stddef.h>
#include <stdbool.h>
#include "platform.h"
#include "global_enum.h"
Include dependency graph for bds.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ast_bds_t
 Binary Data Source (BDS). More...
struct  ast_bds_05_t
 BDS 0,5 - Extended Squitter Airborne Position. More...
struct  ast_bds_08_t
 BDS 0,8 - Extended Squitter Identification and Category. More...
struct  ast_bds_09_t
 BDS 0,9 - Extended Squitter Airborne Position. More...
struct  ast_bds_10_t
 BDS 1,0 - Data Link Capability Report. More...
struct  ast_bds_20_t
 BDS 2,0 - Aircraft Identification. More...
struct  ast_bds_30_t
 BDS 3,0 - TCAS/ACAS Active Resolution Advisory. More...
struct  ast_bds_40_t
 BDS 4,0 - Selected Vertical Intention. More...
struct  ast_bds_50_t
 BDS 5,0 - Track and Turn Report. More...
struct  ast_bds_60_t
 BDS 6,0 - Heading and Speed Report. More...

Macros

#define AST_MAP_BDS_TYPE(msb, lsb)
 Macro used to map BDS type.
#define AST_MAX_BDS   8
 Max number of BDS in one data item.
#define AST_BDS_SIZE   7
 BDS bytes.
#define AST_BDS_DETAIL_HTML_PREFERED_CHARS   20480
 Prefered number of chars of BDS detail description HTML snippet.

Enumerations

enum  ast_bds_type_t {
  BDS00 = 0x00 , BDS05 = 0x05 , BDS06 = 0x06 , BDS07 = 0x07 ,
  BDS08 = 0x08 , BDS09 = 0x09 , BDS0A = 0x0A , BDS10 = 0x10 ,
  BDS17 = 0x17 , BDS20 = 0x20 , BDS30 = 0x30 , BDS40 = 0x40 ,
  BDS50 = 0x50 , BDS60 = 0x60 , BDS61 = 0x61 , BDS62 = 0x62 ,
  BDS65 = 0x65 , BDSE1 = 0xE1
}
 Definition of BDS type. More...
enum  ast_bds_uelm_capability_t {
  AST_BDS_UELM_CAP_NO = 0 , AST_BDS_UELM_CAP_1S = 1 , AST_BDS_UELM_CAP_500MS = 2 , AST_BDS_UELM_CAP_250MS = 3 ,
  AST_BDS_UELM_CAP_125MS = 4 , AST_BDS_UELM_CAP_60MS = 5 , AST_BDS_UELM_CAP_30MS = 6 , AST_BDS_UELM_CAP_UNASSIGNED = 7
}
 Uplink ELM Average Throughput Capability. More...
enum  ast_bds_delm_capability_t {
  AST_BDS_DELM_CAP_NO = 0 , AST_BDS_DELM_CAP_4SEG_1S = 1 , AST_BDS_DELM_CAP_8SEG_1S = 2 , AST_BDS_DELM_CAP_16SEG_1S = 3 ,
  AST_BDS_DELM_CAP_16SEG_500MS = 4 , AST_BDS_DELM_CAP_16SEG_250MS = 5 , AST_BDS_DELM_CAP_16SEG_125MS = 6 , AST_BDS_DELM_CAP_UNASSIGNED = 7
}
 Downlink ELM Throughput Capability. More...
enum  ast_bds_threat_type_t { AST_BDS_THREAT_TYPE_UNKNOWN = 0 , AST_BDS_THREAT_TYPE_MODES = 1 , AST_BDS_THREAT_TYPE_MODEAC = 2 }
 Threat Type. More...

Functions

const char * ast_bds_type_to_str (const ast_bds_type_t type)
 Convert from ast_bds_type_t to C string.
const char * ast_bds_type_to_str_simple (const ast_bds_type_t type)
 Convert from ast_bds_type_t to C string simple version.
ast_bds_t ast_bds_decode (const unsigned char *buffer, const size_t bufsize, const ast_bds_type_t type)
 Decode BDS from binary data.
const char * ast_bds_get_name (const ast_bds_type_t type)
 Function to get name of one BDS.
void ast_bds_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Function to get a html snippet of detailed description of dataitem.
void ast_bds_get_detail_html_dummy (char *detail, const size_t detail_size, const ast_bds_t bds)
 Dummy get detail function.
ast_bds_05_t ast_bds_05_decode (const ast_bds_t bds)
 Decode function.
void ast_bds_05_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Get detail function.
ast_bds_08_t ast_bds_08_decode (const ast_bds_t bds)
 Decode function.
void ast_bds_08_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Get detail function.
ast_bds_09_t ast_bds_09_decode (const ast_bds_t bds)
 Decode function.
void ast_bds_09_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Get detail function.
ast_bds_10_t ast_bds_10_decode (const ast_bds_t bds)
 Decode function.
void ast_bds_10_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Get detail function.
ast_bds_20_t ast_bds_20_decode (const ast_bds_t bds)
 Decode function.
void ast_bds_20_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Get detail function.
ast_bds_30_t ast_bds_30_decode (const ast_bds_t bds)
 Decode function.
void ast_bds_30_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Get detail function.
ast_bds_40_t ast_bds_40_decode (const ast_bds_t bds)
 Decode function.
void ast_bds_40_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Get detail function.
ast_bds_50_t ast_bds_50_decode (const ast_bds_t bds)
 Decode function.
void ast_bds_50_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Get detail function.
ast_bds_60_t ast_bds_60_decode (const ast_bds_t bds)
 Decode function.
void ast_bds_60_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Get detail function.

Detailed Description

Mode-S transponder Binary Data Source (BDS) registers.

Description:
This file declares the BDS register structures and the decode/detail interfaces for Mode-S transponder Binary Data Source (BDS) register processing.
Note
This implementation is based on RTCA DO-181D and DO-260B