mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-11-22 05:40:10 +00:00
fix for data loop when MLATHUB_ENABLE_ADSB_INGEST
is enabled
This commit is contained in:
parent
8c8ece802d
commit
f34a7e37ea
3 changed files with 27 additions and 4 deletions
|
@ -252,6 +252,8 @@ The web interface is rendered to port `80` in the container. This can me mapped
|
||||||
|
|
||||||
All of the variables below are optional.
|
All of the variables below are optional.
|
||||||
|
|
||||||
|
Note - due to design limitations of `readsb`, the `tar1090` graphical interface will by default ONLY show MLAT results from the aggregators/MLAT sources that were defined with the `MLAT_NET_CONNECTOR` parameter. If you want to show any additional MLAT results (for example, those from `piaware`), you should add a separate `READSB_NET_CONNECTOR` for them.
|
||||||
|
|
||||||
#### `tar1090` Core Configuration
|
#### `tar1090` Core Configuration
|
||||||
|
|
||||||
| Environment Variable | Purpose | Default |
|
| Environment Variable | Purpose | Default |
|
||||||
|
@ -467,11 +469,12 @@ No paths need to be mapped through to persistent storage. However, if you don't
|
||||||
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:
|
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
|
* 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.)
|
* ingest MLAT results from other containers (FlightAware, Radarbox, etc.)
|
||||||
* make the consolidated MLAT results available on a port in Beast or SBS (BaseStation) format
|
* 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
|
* create outbound connections using any supported format to send your Beast data wherever you want
|
||||||
|
|
||||||
|
Note - due to design limitations of `readsb`, the `tar1090` graphical interface will by default ONLY show MLAT results from the aggregators/MLAT sources that were defined with the `MLAT_NET_CONNECTOR` parameter. If you want to show any additional MLAT results (for example, those from `piaware`), you should add a separate `READSB_NET_CONNECTOR` for them. Adding these sources only to `MLATHUB_NET_CONNECTOR` will make the data available on the MLATHUB, but won't display them on your `tar1090` map.
|
||||||
|
|
||||||
Generally, there is little to configure, but there are a few parameters that you can set or change:
|
Generally, there is little to configure, but there are a few parameters that you can set or change:
|
||||||
|
|
||||||
| Variable | Description | Default if omitted|
|
| Variable | Description | Default if omitted|
|
||||||
|
|
|
@ -24,7 +24,9 @@ MLATHUB_CMD+=("--mlat")
|
||||||
MLATHUB_CMD+=("--forward-mlat")
|
MLATHUB_CMD+=("--forward-mlat")
|
||||||
|
|
||||||
# send MLAT data to the main readsb/tar1090 of this container:
|
# send MLAT data to the main readsb/tar1090 of this container:
|
||||||
MLATHUB_CMD+=("--net-connector=localhost,30004,beast_reduce_out")
|
# 26-mar-2023 this was removed; we'll have the main readsb connect directly to the mlat clients. This
|
||||||
|
# is to avoid a data loop in case MLATHUB_ENABLE_ADSB_INGEST is enabled
|
||||||
|
# MLATHUB_CMD+=("--net-connector=localhost,30004,beast_reduce_out")
|
||||||
|
|
||||||
# define some more ports:
|
# define some more ports:
|
||||||
MLATHUB_CMD+=("--net-sbs-port=${MLATHUB_SBS_OUT_PORT:-31003}")
|
MLATHUB_CMD+=("--net-sbs-port=${MLATHUB_SBS_OUT_PORT:-31003}")
|
||||||
|
|
|
@ -39,6 +39,24 @@ if [ -n "${UUID}" ]; then
|
||||||
READSB_CMD+=("--uuid-file=/run/uuid")
|
READSB_CMD+=("--uuid-file=/run/uuid")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ingest MLAT results data if MLAT clients have been defined:
|
||||||
|
# parse MLAT_CONFIG string into mlat_configs array
|
||||||
|
# note - it's OK for MLAT_CONFIG to be empty or unset
|
||||||
|
readarray -td ";" mlat_configs < <(printf '%s' "${MLAT_CONFIG// /}")
|
||||||
|
# Now loop through the MLAT_CONFIG items and add a net-connector for each of them:
|
||||||
|
for instance in "${mlat_configs[@]}"
|
||||||
|
do
|
||||||
|
# shellcheck disable=SC2015
|
||||||
|
[[ -z "${instance}" ]] && continue || true
|
||||||
|
# put individual params into the $params array:
|
||||||
|
readarray -td "," params < <(printf '%s' "${instance}")
|
||||||
|
|
||||||
|
if [[ -n "${params[2]}" ]]
|
||||||
|
then
|
||||||
|
MLATHUB_CMD+=("--net-connector=localhost,${params[2]},beast_in")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
READSB_CMD+=("--write-json=/run/readsb")
|
READSB_CMD+=("--write-json=/run/readsb")
|
||||||
READSB_CMD+=("--heatmap-dir=/var/globe_history")
|
READSB_CMD+=("--heatmap-dir=/var/globe_history")
|
||||||
READSB_CMD+=("--heatmap=15")
|
READSB_CMD+=("--heatmap=15")
|
||||||
|
@ -54,10 +72,10 @@ READSB_CMD+=("--net-bo-port=30005")
|
||||||
READSB_CMD+=("--net-beast-reduce-out-port=30006")
|
READSB_CMD+=("--net-beast-reduce-out-port=30006")
|
||||||
READSB_CMD+=("--net-json-port=30047")
|
READSB_CMD+=("--net-json-port=30047")
|
||||||
READSB_CMD+=(--net-api-port=30152)
|
READSB_CMD+=(--net-api-port=30152)
|
||||||
# READSB_CMD+=(--forward-mlat)
|
|
||||||
READSB_CMD+=(--net-sbs-in-port=32006)
|
READSB_CMD+=(--net-sbs-in-port=32006)
|
||||||
|
|
||||||
if [[ -n "${READSB_FORWARD_MLAT}" ]]; then
|
if [[ -n "${READSB_FORWARD_MLAT}" ]]; then
|
||||||
|
echo "[$(date +"%Y-%m-%d %H:%M:%S")][readsb] WARNING -- READSB_FORWARD_MLAT has been set! Do not feed the output of this container to any aggregretors!"
|
||||||
READSB_CMD+=("--forward-mlat")
|
READSB_CMD+=("--forward-mlat")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -298,5 +316,5 @@ fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
"${READSB_BIN}" "${READSB_CMD[@]}" $READSB_EXTRA_ARGS 2>&1 | \
|
"${READSB_BIN}" "${READSB_CMD[@]}" $READSB_EXTRA_ARGS 2>&1 | \
|
||||||
mawk -W Interactive '{print "[" strftime("%Y/%m/%d %H:%M:%S", systime()) "][readsb] " $0}'
|
mawk -W Interactive '{print "[" strftime("%Y-%m-%d %H:%M:%S", systime()) "][readsb] " $0}'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue