From 05c8ba67ccba8f0f7da43fd3c449833d86bfeff1 Mon Sep 17 00:00:00 2001 From: kx1t Date: Wed, 22 Mar 2023 22:50:49 +0100 Subject: [PATCH] mlathub updates --- README.md | 29 ++++++++++++++++++++++++++--- rootfs/etc/services.d/mlathub/run | 13 +++++++++---- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 33e23d0..a22cc9c 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,10 @@ Some common ports are as follows (which may or may not be in use depending on yo | `30005/tcp` | Beast protocol output | | `30006/tcp` | Beast reduce protocol output | | `30047/tcp` | Json position output | +| `31003/tcp` | MLATHUB SBS/Basestation protocol output | +| `31004/tcp` | MLATHUB Beast protocol input | +| `31005/tcp` | MLATHUB Beast protocol output | + Json position output: @@ -330,19 +334,38 @@ Where the default value is "Unset", `readsb`'s default will be used. | `READSB_STATS_RANGE` | Set this to any value to collect range statistics for polar plot. | `--stats-range` | Unset | | `READSB_RANGE_OUTLINE_HOURS` | Change which past timeframe the range outline is based on | `--range-outline-hours` | `24` | +## Configuring the built-in MLAT Hub + +An "MLAT Hub" is an aggregator of MLAT results from several sources. Since the container is capable of sending MLAT data to multiple ADSB aggregators (like adsb.lol/fi/one, etc), we built in a capability to: + +* collect the MLAT results from all of these services +* feed them back to the built-in `tar1090` graphical interface +* ingest MLAT results from other containers (FlightAware, Radarbox, etc.) +* make the consolidated MLAT results available on a port in Beast or SBS (BaseStation) format +* create outbound connections using any supported format to send your Beast data wherever you want + +Generally, there is little to configure, but there are a few parameters that you can set or change: + +| Variable | Description | Default if omitted| +|----------|-------------|--------------------------------| +| `MLATHUB_SBS_OUT_PORT` | TCP port where the consolidated MLAT results will be available in SBS (BaseStation) format | `31004` | +| `MLATHUB_BEAST_IN_PORT` | TCP port you where you can send additional MLAT results to, in Beast format | `31004` | +| `MLATHUB_BEAST_OUT_PORT` | TCP port where consolidated MLAT results will be available in Beast format | `31005` | +| `MLATHUB_NET_CONNECTOR` | List of semi-colon separated IP or host, port, and protocols where MLATHUB will connect to ingest or send MLAT data. It follows the same syntax as described in the "`READSB_NET_CONNECTOR` syntax " section above. | Unset | + ## Message decoding introspection You can look at individual messages and what information they contain, either for all or for an individual aircraft by hex: ```shell # only for hex 3D3ED0 -docker exec -it tar1090 /usr/local/bin/viewadsb --show-only 3D3ED0 +docker exec -it adsb-superfeeder /usr/local/bin/viewadsb --show-only 3D3ED0 # for all aircraft -docker exec -it tar1090 /usr/local/bin/viewadsb --no-interactive +docker exec -it adsb-superfeeder /usr/local/bin/viewadsb --no-interactive # show position / CPR debugging for hex 3D3ED0 -docker exec -it tar1090 /usr/local/bin/viewadsb --cpr-focus 3D3ED0 +docker exec -it adsb-superfeeder /usr/local/bin/viewadsb --cpr-focus 3D3ED0 ``` ## Configuring `graphs1090` diff --git a/rootfs/etc/services.d/mlathub/run b/rootfs/etc/services.d/mlathub/run index 77c35d4..24b1c61 100644 --- a/rootfs/etc/services.d/mlathub/run +++ b/rootfs/etc/services.d/mlathub/run @@ -18,20 +18,25 @@ fi # Build the readsb command line based on options MLATHUB_BIN="/usr/local/bin/readsb" +# set some basic options: MLATHUB_CMD=("--net") MLATHUB_CMD+=("--quiet") MLATHUB_CMD+=("--net-only") MLATHUB_CMD+=("--mlat") MLATHUB_CMD+=("--forward-mlat") -MLATHUB_CMD+=("--net-bo-port=${MLATHUB_BEAST_OUT_PORT:-39105}") -MLATHUB_CMD+=("--net-sbs-port=${MLATHUB_SBS_OUTPUT_PORT:-39003}") +# send MLAT data to the main readsb/tar1090 of this container: + MLATHUB_CMD+=("--net-connector=localhost,30004,beast_reduce_out") + +# define some more ports: +MLATHUB_CMD+=("--net-sbs-port=${MLATHUB_SBS_OUT_PORT:-31003}") +MLATHUB_CMS+=("--net-bi-port=${MLATHUB_BEAST_IN_PORT:-31004}") +MLATHUB_CMD+=("--net-bo-port=${MLATHUB_BEAST_OUT_PORT:-31005}") # We need to get the mlat results ports from the parameters: # parse MLAT_CONFIG string into mlat_configs array readarray -td ";" mlat_configs < <(printf '%s' "${MLAT_CONFIG// /}") - -# Now loop through the MLAT_CONFIG items and start up an Mlat_client for each of them: +# Now loop through the MLAT_CONFIG items and add a net-connector for each of them: mlat_result_sources=0 for instance in "${mlat_configs[@]}" do