From ce5302d79b6df54163979cb1e02ce89d38e0c76b Mon Sep 17 00:00:00 2001 From: kx1t Date: Sat, 25 Mar 2023 13:36:16 -0400 Subject: [PATCH] add support for `MLATHUB_ENABLE_ADSB_INGEST` --- README.md | 1 + rootfs/etc/services.d/mlathub/run | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index ef89b90..bbf741a 100644 --- a/README.md +++ b/README.md @@ -480,6 +480,7 @@ Generally, there is little to configure, but there are a few parameters that you | `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](#alternate-configuration-method-with-readsb_net_connector) above. | Unset | +| `MLATHUB_ENABLE_ADSB_INGEST` | If set to any non-empty value, the MLATHUB will ingest the ADSB data from the readsb component and make it available on its output port. This is useful if you want to connect to external applications that want both ADSB and MLAT result data (for example, Planefence). Note -- do not use this option to feed external aggregators as they generally do not want to receive processed MLAT data. | Unset | ## Message decoding introspection diff --git a/rootfs/etc/services.d/mlathub/run b/rootfs/etc/services.d/mlathub/run index 281f6e4..6c35885 100644 --- a/rootfs/etc/services.d/mlathub/run +++ b/rootfs/etc/services.d/mlathub/run @@ -55,6 +55,11 @@ then sleep infinity fi +# handle MLATHUB_ENABLE_ADSB_INGEST (if set, connect to readsb as input) +if [[ -n "$MLATHUB_ENABLE_ADSB_INGEST" ]; then + MLATHUB_CMD+=("--net-connector=localhost,30006,beast_in") +fi + # Add any additional net_connectors: if [[ -n "$MLATHUB_NET_CONNECTOR" ]]; then IFS=';' read -r -a MLATHUB_NET_CONNECTOR_ARRAY <<< "$MLATHUB_NET_CONNECTOR"