From fb0fbf7769c5751fb0a2823401b59ad2702b1eda Mon Sep 17 00:00:00 2001 From: kx1t Date: Fri, 13 Oct 2023 16:23:16 -0400 Subject: [PATCH] add param to disabled adsbx stats --- README.md | 7 +++++-- rootfs/etc/s6-overlay/scripts/adsbx-stats | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d0d613..63b5a45 100644 --- a/README.md +++ b/README.md @@ -333,6 +333,8 @@ There are several aggregators, both non-profit and commercial, that can directly | RadarPlane | N | Run by a few volunteers in Canada and Portugal | adsb: `feed.radarplane.com` port `30001`
mlat: `feed.radarplane.com` port `31090` | | Fly Italy ADSB | N | Run by a few ADSB enthusiasts in Italy | adsb: `dati.flyitalyadsb.com` port `4905`
mlat: `dati.flyitalyadsb.com` port `30100` | +When feeding AdsbExchange, Ultrafeeder will send statistics to adsbexchange.com by default. See the description of the `ADSBX_STATS` parameter on how to disable this. + ##### Alternate Configuration Method with `READSB_NET_CONNECTOR` Instead of (or in addition to) using `BEASTHOST`, you can also define ADSB data ingests using the `READSB_NET_CONNECTOR` parameter. This is the preferred way if you have multiple sources or destinations for your ADSB data. This variable allows you to configure incoming and outgoing connections. The variable takes a semicolon (`;`) separated list of `host,port,protocol[,uuid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX]`, see the section [All-in-One Configuration using `ULTRAFEEDER_CONFIG`](#all-in-one-configuration-using-ultrafeeder_config) for explanation of these parameters. @@ -350,7 +352,7 @@ NOTE: If you have a UAT dongle and use `dump978` to decode this, you should use There are many optional parameters relating to the ingestion of data and the general networking functioning of the `readsb` program that implements this functionality. -| Variable | Description | Controls which `readsb` option | Default | +| Variable | Description | Controls which `readsb` option | Default | | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------- | ------------- | | `READSB_NET_API_PORT` | | `--net-api-port=` | `30152` | | `READSB_NET_BEAST_REDUCE_INTERVAL` | BeastReduce position update interval, longer means less data (valid range: `0.000` - `14.999`) | `--net-beast-reduce-interval=` | `1.0` | @@ -375,7 +377,8 @@ There are many optional parameters relating to the ingestion of data and the gen | `READSB_JSON_INTERVAL` | Update interval for the webinterface in seconds / interval between aircraft.json writes | `--write-json-every=` | `1.0` | | `READSB_JSON_TRACE_INTERVAL` | Per plane interval for json position output and trace interval for globe history | `--json-trace-interval=` | `15` | | `READSB_FORWARD_MLAT_SBS` | If set to anything, it will include MLAT results in the SBS/BaseStation output. This may be desirable if you feed SBS data to applications like [VRS](https://github.com/sdr-enthusiasts/docker-virtualradarserver) or [PlaneFence](https://github.com/kx1t/docker-planefence) | Unset | -| `UUID` | Sets the UUID that is sent on the `beast_reduce_plus` port if no individual UUIDs have been defined with the `READSB_NET_CONNECTOR` parameter. Similarly, it's also used with `mlat-client` (see below) if no individual UUIDs have been set with the `MLAT_CONFIG` parameter. | | unset | +| `UUID` | Sets the UUID that is sent on the `beast_reduce_plus` port if no individual UUIDs have been defined with the `READSB_NET_CONNECTOR` parameter. Similarly, it's also used with `mlat-client` (see below) if no individual UUIDs have been set with the `MLAT_CONFIG` parameter. | | Unset | +| ÀDSBX_STATS | Unset | | If set to `disabled`/`off`/`0`/`no`, and feeding to adsbexchange has been configured, no special statistics will be shared with AdsbExchange | Unset (on) | #### MLAT configuration diff --git a/rootfs/etc/s6-overlay/scripts/adsbx-stats b/rootfs/etc/s6-overlay/scripts/adsbx-stats index 3ff355e..84f81c1 100755 --- a/rootfs/etc/s6-overlay/scripts/adsbx-stats +++ b/rootfs/etc/s6-overlay/scripts/adsbx-stats @@ -11,6 +11,12 @@ if ! grep -i adsbexchange.com <<< "$ULTRAFEEDER_CONFIG" >/dev/null 2>&1; then sleep infinity & wait $! fi +# Check if ADSBExchange stats are disabled +if chk_disabled "$ADSBX_STATS" ; then + "${s6wrap[@]}" echo "AdsbExchange stats disabled" + sleep infinity & wait $! +fi + # prep work: mkdir -p /run/adsbexchange-stats