Client for receiving and decoding ADS-B broadcast.
More...
#include <ADSB.h>
|
| | ADSBClient (PhysicalLayer *phy) |
| | Default constructor.
|
| |
| int16_t | begin () |
| | Initialization method.
|
| |
| int16_t | decode (const uint8_t in[RADIOLIB_ADSB_FRAME_LEN_BYTES], ADSBFrame *out) |
| | Frame decoding method, turns raw received binary data into ADS-B frame.
|
| |
| int16_t | parseHexId (const ADSBFrame *in, char id[RADIOLIB_ADSB_HEX_ID_LEN]) |
| | Method to parse the transponder ICAO address (hex ID).
|
| |
| int16_t | parseCallsign (const ADSBFrame *in, char callsign[RADIOLIB_ADSB_CALLSIGN_LEN], ADSBAircraftCategory *cat=NULL) |
| | Method to parse callsign from a received frame.
|
| |
| void | setReferencePosition (float lat, float lon) |
| | Method to set reference position to be used during airborne position calculation.
|
| |
| int16_t | parseAirbornePosition (const ADSBFrame *in, int *alt, float *lat, float *lon, bool *altGnss=NULL) |
| | Parse aircraft position from incoming frame, uasing reference position set by setReferencePosition. The reference position is the "rough area" where the aircraft is located, typically it is the receiver location. Aircraft position will be calcualted accurately only within 180 nautical miles (about 333 km) from the reference position!
|
| |
Client for receiving and decoding ADS-B broadcast.
◆ ADSBClient()
Default constructor.
- Parameters
-
| phy | Pointer to the wireless module providing PhysicalLayer communication. |
◆ begin()
| int16_t ADSBClient::begin |
( |
| ) |
|
◆ decode()
| int16_t ADSBClient::decode |
( |
const uint8_t |
in[RADIOLIB_ADSB_FRAME_LEN_BYTES], |
|
|
ADSBFrame * |
out |
|
) |
| |
Frame decoding method, turns raw received binary data into ADS-B frame.
- Parameters
-
| in | Received raw data. |
| out | Pointer to ADSBFrame where the decoded frame will be saved. |
- Returns
- Status Codes
◆ parseAirbornePosition()
| int16_t ADSBClient::parseAirbornePosition |
( |
const ADSBFrame * |
in, |
|
|
int * |
alt, |
|
|
float * |
lat, |
|
|
float * |
lon, |
|
|
bool * |
altGnss = NULL |
|
) |
| |
Parse aircraft position from incoming frame, uasing reference position set by setReferencePosition. The reference position is the "rough area" where the aircraft is located, typically it is the receiver location. Aircraft position will be calcualted accurately only within 180 nautical miles (about 333 km) from the reference position!
- Parameters
-
| in | Pointer to ADSBFrame where decoded frame was saved. |
| alt | Pointer to variable where the parsed altitude will be saved. Can be set to null to skip altitude calculation. Units are feet for barometric altitude, meters for GNSS altitude. |
| lat | Pointer to variable where the parsed latitude in degrees will be saved. Can be set to null to skip latitude calculation. |
| lon | Pointer to variable where the parsed longitude in degrees will be saved. Can be set to null to skip longitude calculation. |
| altGnss | If set, this variable will be set to true if the altitude source is GNSS, or false if the altitude is barometric. |
◆ parseCallsign()
| int16_t ADSBClient::parseCallsign |
( |
const ADSBFrame * |
in, |
|
|
char |
callsign[RADIOLIB_ADSB_CALLSIGN_LEN], |
|
|
ADSBAircraftCategory * |
cat = NULL |
|
) |
| |
Method to parse callsign from a received frame.
- Parameters
-
| in | Pointer to ADSBFrame where decoded frame was saved. |
| callsign | Buffer where the parsed callsign will be saved as null-terminated string. |
| cat | If set, parsed aircraft category will be saved here. |
- Returns
- Status Codes
◆ parseHexId()
| int16_t ADSBClient::parseHexId |
( |
const ADSBFrame * |
in, |
|
|
char |
id[RADIOLIB_ADSB_HEX_ID_LEN] |
|
) |
| |
Method to parse the transponder ICAO address (hex ID).
- Parameters
-
| in | Pointer to ADSBFrame where decoded frame was saved. |
| callsign | Buffer where the parsed ID will be saved as null-terminated string. |
- Returns
- Status Codes
◆ setReferencePosition()
| void ADSBClient::setReferencePosition |
( |
float |
lat, |
|
|
float |
lon |
|
) |
| |
Method to set reference position to be used during airborne position calculation.
- Parameters
-
| lat | Reference latitude in degrees (north positive, south negative). |
| lat | Reference longitude in degrees (east positive, west negative). |
The documentation for this class was generated from the following files:
- src/protocols/ADSB/ADSB.h
- src/protocols/ADSB/ADSB.cpp