2016-02-13 22:38:40 +00:00
|
|
|
# Beast protocol
|
|
|
|
|
|
|
|
|
|
## Ports
|
|
|
|
|
|
|
|
|
|
* 30005: server -> client feed
|
|
|
|
|
|
2016-02-13 22:56:41 +00:00
|
|
|
## Format
|
|
|
|
|
|
2016-02-13 22:58:09 +00:00
|
|
|
All data is escaped: `0x1a` -> `0x1a 0x1a`. Note that synchronization is still
|
2016-02-13 22:56:41 +00:00
|
|
|
complex, since `0x1a 0x31` may be the start of a frame or mid-data, depending
|
|
|
|
|
on what preceded it. To synchronize, you must see, in order:
|
2016-02-13 22:58:09 +00:00
|
|
|
* != `0x1a`
|
|
|
|
|
* `0x1a`
|
|
|
|
|
* {`0x31`, `0x32`, `0x33`}
|
|
|
|
|
|
2016-02-13 22:56:41 +00:00
|
|
|
Escaping makes frame length for a given type variable, up to
|
2016-02-13 22:58:09 +00:00
|
|
|
`2 + (2 * data_length_sum)`
|
|
|
|
|
|
2016-02-13 22:56:41 +00:00
|
|
|
|
2016-02-13 23:12:48 +00:00
|
|
|
## Frame structure
|
|
|
|
|
* `0x1a`
|
2016-02-13 23:14:36 +00:00
|
|
|
* 1 byte frame type (see types below)
|
2016-02-13 23:12:48 +00:00
|
|
|
* 6 byte MLAT timestamp (see below)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Frame types
|
2016-02-13 23:14:36 +00:00
|
|
|
* `0x31`: Mode-AC frame
|
2016-02-16 21:06:28 +00:00
|
|
|
* 1 byte [RSSI](https://en.wikipedia.org/wiki/Received_signal_strength_indication)
|
2016-02-13 22:56:41 +00:00
|
|
|
* 2 byte Mode-AC data
|
2016-02-13 23:14:36 +00:00
|
|
|
* `0x32`: Mode-S short frame
|
2016-02-16 21:06:28 +00:00
|
|
|
* 1 byte RSSI
|
2016-02-13 22:56:41 +00:00
|
|
|
* 7 byte Mode-S short data
|
2016-02-13 23:14:36 +00:00
|
|
|
* `0x33`: Mode-S long frame
|
2016-02-16 21:06:28 +00:00
|
|
|
* 1 byte RSSI
|
2016-02-13 22:56:41 +00:00
|
|
|
* 14 byte Mode-S long data
|
2016-02-13 23:14:36 +00:00
|
|
|
* `0x34`: Status data
|
2016-02-13 22:59:14 +00:00
|
|
|
* *Appears to only be used by Mode-S Beast hardware later versions*
|
2016-02-13 22:56:41 +00:00
|
|
|
* ?? byte status data
|
|
|
|
|
* ?? byte DIP switch configuration
|
|
|
|
|
|
2016-02-13 23:12:48 +00:00
|
|
|
|
|
|
|
|
## MLAT timestamp
|
2016-02-13 23:14:36 +00:00
|
|
|
The MLAT timestamp included in each frame is the big-endian value of a 12 MHz
|
|
|
|
|
counter at the time of packet reception. This counter isn't calibrated to
|
|
|
|
|
external time, but receiving software can calculate its offset from other
|
|
|
|
|
receiving stations across multiple packets, and then use the differences between
|
|
|
|
|
station receive timing to calculate signal source position.
|
2016-02-13 23:12:48 +00:00
|
|
|
|
2016-02-17 04:45:23 +00:00
|
|
|
FlightAware's dump1090 fork sends `0x00 0x00 0x00 0x00 0x00 0x00` when it has
|
|
|
|
|
no MLAT data.
|
2016-02-16 21:06:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## RSSI
|
2016-02-17 04:45:23 +00:00
|
|
|
FlightAware's dump1090 fork sends `0xff` when it has no RSSI data.
|
2016-02-16 21:06:28 +00:00
|
|
|
|
2016-02-13 23:12:48 +00:00
|
|
|
|
2016-02-13 23:22:24 +00:00
|
|
|
## Examples
|
|
|
|
|
|
2016-02-13 23:55:12 +00:00
|
|
|
* `0x1a 0x32 0x08 0x3e 0x27 0xb6 0xcb 0x6a 0x1a 0x1a 0x00 0xa1 0x84 0x1a 0x1a 0xc3 0xb3 0x1d`
|
|
|
|
|
* `0x1a`: Frame start
|
|
|
|
|
* `0x32`: Mode-S short frame
|
|
|
|
|
* `0x08 0x3e 0x27 0xb6 0xcb 0x6a`: MLAT counter value
|
2016-02-13 23:22:24 +00:00
|
|
|
* Decimal: 9063047285610
|
2016-02-13 23:55:12 +00:00
|
|
|
* `0x1a 0x1a`: Signal level
|
|
|
|
|
* Unescaped: `0x1a`
|
|
|
|
|
* Decimal: 26
|
2016-02-13 23:59:40 +00:00
|
|
|
* 26 / 255 * 100% = 10%
|
2016-02-13 23:55:12 +00:00
|
|
|
* `0x00 0xa1 0x84 0x1a 0x1a 0xc3 0xb3 0x1d`: Mode-S short data
|
|
|
|
|
* Unescaped: `0x00 0xa1 0x84 0x1a 0xc3 0xb3 0x1d`
|
2016-02-13 23:22:24 +00:00
|
|
|
|
|
|
|
|
|
2016-02-13 22:38:40 +00:00
|
|
|
## Implementations
|
|
|
|
|
|
|
|
|
|
* [Mode-S Beast hardware](http://modesbeast.com/scope.html)
|
|
|
|
|
* [FlightAware dump1090 fork](https://flightaware.com/adsb/piaware/install)
|
|
|
|
|
|
2016-02-13 23:22:24 +00:00
|
|
|
|
2016-02-13 22:38:40 +00:00
|
|
|
## References
|
|
|
|
|
|
|
|
|
|
* [Original description](http://wiki.modesbeast.com/Mode-S_Beast:Data_Output_Formats)
|