Skip to content

Commit

Permalink
add option to disable MLAT (#85)
Browse files Browse the repository at this point in the history
currently MLAT can't be disabled contrary to the readme
  • Loading branch information
wiedehopf authored Nov 5, 2024
1 parent 97109dd commit f413d8f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ To add `RadarVirtuel` to an existing Docker Stack, simply copy and paste the rel
| `LAT` | This is your station latitude (used with MLAT) | |
| `LON` | This is your station longitude (used with MLAT) | |
| `ALT` | This is your antenna altitude above the ellipsoid (MSL). Use "ft" for feet or "m" for meters | |
| `ENABLE_MLAT` | Enable MLAT | `true` (default) / `false` |

## MLAT Configuration

By default, MLAT is switched ON in the container. Please make sure to configure a valid `MLAT_HOST`, `LAT`, `LON`, and `ALT` in your `docker-compose.yml` setup. If you want to switch off MLAT, simply set `MLAT_HOST` to empty. You will see a message in the logs encouraging to configure MLAT, followed by a message saying that MLAT is disabled.
By default, MLAT is switched ON in the container. Please make sure to configure a valid `MLAT_HOST`, `LAT`, `LON`, and `ALT` in your `docker-compose.yml` setup. If you want to switch off MLAT, simply set `ENABLE_MLAT` to false.

## Timezone configuration

Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ services:
- FEEDER_KEY=${RV_FEEDER_KEY}
- SOURCE_HOST=${HOSTNAME}:30002
- RV_SERVER=mg2.adsbnetwork.com:50050
# MLAT related params; set "MLAT_HOST=" (empty) to disable MLAT
# MLAT related params
- ENABLE_MLAT=true
- MLAT_HOST=${HOSTNAME}:30005
- MLAT_SERVER=mlat.adsbnetwork.com:50000
- LAT=${FEEDER_LAT}
Expand Down
4 changes: 4 additions & 0 deletions rootfs/etc/s6-overlay/scripts/55-mlat-client
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

source /scripts/common

if chk_disabled "${ENABLE_MLAT}"; then
exit 0
fi

"${s6wrap[@]}" echo "Initializing mlat-client..."

MLAT_FLAG="/run/mlat-down"
Expand Down
5 changes: 5 additions & 0 deletions rootfs/etc/s6-overlay/scripts/mlat-client
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

source /scripts/common

if chk_disabled "${ENABLE_MLAT}"; then
"${s6wrap[@]}" echo "MLAT is DISABLED (ENABLE_MLAT set to $ENABLE_MLAT)"
stop_service
fi

"${s6wrap[@]}" echo "Started as an s6 service"

MLAT_CMD="/usr/local/bin/mlat-client"
Expand Down

0 comments on commit f413d8f

Please sign in to comment.