Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for 7.2 #124

Merged
merged 5 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add env vars to control dump1090 adaptive gain
  • Loading branch information
mikenye committed Mar 28, 2022
commit 33f16d4b267c62c0c2690430dbd8863c68ea57a6
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Please see: [Buster-Docker-Fixes](https://github.com/sdr-enthusiasts/Buster-Dock
* [Multilateration](#multilateration)
* [Receiver Configuration (1090MHz)](#receiver-configuration-1090mhz)
* [RTL-SDR Configuration (1090MHz)](#rtl-sdr-configuration-1090mhz)
* [Adaptive Gain Configuration (1090MHz)](#adaptive-gain-configuration-1090mhz)
* [Relay Configuration (1090MHz)](#relay-configuration-1090mhz)
* [Receiver Configuration (978MHz)](#receiver-configuration-978mhz)
* [RTL-SDR Configuration (978MHz)](#rtl-sdr-configuration-978mhz)
Expand Down Expand Up @@ -452,6 +453,19 @@ Use only with `RECEIVER_TYPE=rtlsdr`.
| `RTLSDR_GAIN` | `max` or a numeric gain level | Optimizing gain (optional) -- See [FlightAware -- Optimizing Gain](https://discussions.flightaware.com/t/thoughts-on-optimizing-gain/44482/2) | `max` |
| `DUMP1090_DEVICE` | rtlsdr device serial number | Configures which dongle to use for 1090MHz reception if there is more than one connected | first available device |

#### Adaptive Gain Configuration (1090MHz)

The following settings control the [adaptive gain configuration](https://github.com/flightaware/dump1090/blob/master/README.adaptive-gain.md) of `dump1090` when using `RECEIVER_TYPE=rtlsdr`.

| Environment Variable | Possible Values | Description | Default |
| -------------------- | --------------- | ------- | ------- |
| `DUMP1090_ADAPTIVE_RANGE` | | Set to any value to adjust gain for target dynamic range. | |
| `DUMP1090_ADAPTIVE_RANGE_TARGET` | A value in dB | Set target dynamic range in dB. | |
| `DUMP1090_ADAPTIVE_BURST` | | Adjust gain for too-loud message bursts. | |
| `DUMP1090_ADAPTIVE_MIN_GAIN` | A value in dB | Set gain adjustment range lower limit (dB). | |
| `DUMP1090_ADAPTIVE_MAX_GAIN` | A value in dB | Set gain adjustment range upper limit (dB). | |
| `DUMP1090_ADAPTIVE_DUTY_CYCLE` | A percentage | Set adaptive gain duty cycle % (1..100) </br> See [Reducing the CPU cost of adaptive gain](https://github.com/flightaware/dump1090/blob/master/README.adaptive-gain.md#reducing-the-cpu-cost-of-adaptive-gain) | |

### Relay Configuration (1090MHz)

Use only with `RECEIVER_TYPE=relay`.
Expand Down
23 changes: 23 additions & 0 deletions rootfs/etc/services.d/dump1090/run
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,29 @@ else
DUMP1090_CMD+=("--gain" "$RTLSDR_GAIN")
fi

if [[ -n "$DUMP1090_ADAPTIVE_RANGE" ]]; then
DUMP1090_CMD+=("--adaptive-range")
fi

if [[ -n "$DUMP1090_ADAPTIVE_RANGE_TARGET" ]]; then
DUMP1090_CMD+=("--adaptive-range-target" "$DUMP1090_ADAPTIVE_RANGE_TARGET")
fi

if [[ -n "$DUMP1090_ADAPTIVE_BURST" ]]; then
DUMP1090_CMD+=("--adaptive-burst")
fi

if [[ -n "$DUMP1090_ADAPTIVE_MIN_GAIN" ]]; then
DUMP1090_CMD+=("--adaptive-min-gain" "$DUMP1090_ADAPTIVE_MIN_GAIN")
fi

if [[ -n "$DUMP1090_ADAPTIVE_MAX_GAIN" ]]; then
DUMP1090_CMD+=("--adaptive-max-gain" "$DUMP1090_ADAPTIVE_MAX_GAIN")
fi

if [[ -n "$DUMP1090_ADAPTIVE_DUTY_CYCLE" ]]; then
DUMP1090_CMD+=("--adaptive-duty-cycle" "$DUMP1090_ADAPTIVE_DUTY_CYCLE")
fi
fi

# shellcheck disable=SC2016
Expand Down