A utility library for getting the message length of Mode S messages based on the downlink format.
Mode S is an aviation transponder interrogation mode used by Secondary Surveillance Radar (SSR) and Automatic Dependent Surveillance-Broadcast (ADS-B) systems.
For an example of this module in use, see AirplaneJS.
npm install mode-s-msglen --save
const msglen = require('mode-s-msglen')
const msgbits = msglen(17)
if (msgbits === msglen.LONG_MSG_BITS) {
console.log('This is a long message')
} else {
console.log('This is a short message')
}
LONG_MSG_BITSSHORT_MSG_BITSlen = msglen(type)Given the Downlink Format (DF) of the Mode S message, return the message length in bits.
MIT