Package Exports
- beast-decoder
- beast-decoder/dist/index.js
- beast-decoder/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (beast-decoder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Beast Decoder
Parses messages coming from a BEAST TCP port. For example out.adsb.lol:1337 adsb.lol
Currently supported:
- Mode S
- ADSB (ModeS Extended Squitter)
- DEBUG
Not yet supported:
- Mode AC
Usage
npm i --save beast-decoder
import { BeastHandler } from 'beast-decoder'
import net from 'net'
const handler = new BeastHandler()
handler.addListener('aircraft_new', (ac)=>{
console.log('new aircraft', ac)
})
handler.addListener('aircraft_update', (ac)=>{
console.log('updated aircraft', ac)
})
handler.addListener('aircraft_update_with_location', (ac)=>{
console.log('updated aircraft location', ac)
})
handler.addListener('warning', (w)=>{
console.warn(w.message, w.context)
})
const socket: new net.Socket()
socket.connect({
port: 1337,
host: 'out.adsb.lol',
family: 4 // force ipv4
})
socket.on('data', data =>{
handler.handleBeastData(data)
})
socket.on('close', ()=>{
handler.stop()
})
Dependencies
- mode-s-adsb-parser (same Author as this library)
Changelog
see CHANGELOG.md
For Developers
see DEV.md