Skip to content

Commit

Permalink
beast-reduce-interval reduction + READSB_ENABLE_API (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
kx1t authored Feb 22, 2024
2 parents f941be5 + 3047cdc commit b209dc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ There are many optional parameters relating to the ingestion of data and the gen
| Variable | Description | Controls which `readsb` option | Default |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------- | ------------- |
| `READSB_NET_API_PORT` | <https://github.com/wiedehopf/readsb/blob/dev/README-json.md#--net-api-port-query-formats> | `--net-api-port=<ports>` | `30152` |
| `READSB_ENABLE_API` | Adds nginx proxies api at /re-api. Use with extraargs --write-json-globe-index --tar1090-use-api to get fast map with many planes | various | disabled |
| `READSB_NET_BEAST_REDUCE_INTERVAL` | BeastReduce position update interval, longer means less data (valid range: `0.000` - `14.999`) | `--net-beast-reduce-interval=<seconds>` | `1.0` |
| `READSB_NET_BEAST_REDUCE_FILTER_DIST` | Restrict beast-reduce output to aircraft in a radius of X nmi | `--net-beast-reduce-filter-dist=<nmi>` | Unset |
| `READSB_NET_BEAST_REDUCE_FILTER_ALT` | Restrict beast-reduce output to aircraft below X ft | `--net-beast-reduce-filter-alt=<ft>` | Unset |
Expand Down
8 changes: 6 additions & 2 deletions rootfs/etc/s6-overlay/scripts/readsb
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,13 @@ fi

READSB_CMD+=("--net-api-port=${READSB_NET_API_PORT:-30152}")

if chk_enabled "${READSB_ENABLE_API}"; then
READSB_CMD+=("--net-api-port=unix:/run/readsb/api.sock")
fi

# Handle "--net-beast-reduce-interval=<seconds>"
# Default it to 1.0 second if no value is provided
READSB_CMD+=("--net-beast-reduce-interval=${READSB_NET_BEAST_REDUCE_INTERVAL:-1.0}")
# Default it to 0.5 second if no value is provided, which is reasonable for feeding aggregators
READSB_CMD+=("--net-beast-reduce-interval=${READSB_NET_BEAST_REDUCE_INTERVAL:-0.5}")

# Handle "--net-beast-reduce-out-port=<ports>"
if [[ -n "$READSB_NET_BEAST_REDUCE_OUT_PORT" ]]; then
Expand Down

0 comments on commit b209dc4

Please sign in to comment.