# Enabling Auto Gain

**URL:** <https://discussions.flightaware.com/t/enabling-auto-gain/79065>\
**Category:** ADS-B Flight Tracking\
**Created:** [September 4, 2021, 7:32pm UTC](https://discussions.flightaware.com/t/enabling-auto-gain/79065 "2021-09-04T19:32:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![abcd567](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/abcd567/32/113769_2.png) [@abcd567](https://discussions.flightaware.com/u/abcd567)\
**Post date:** [September 4, 2021, 7:45pm UTC](https://discussions.flightaware.com/t/enabling-auto-gain/79065/2 "2021-09-04T19:45:07Z")

</div>

**SOURCE: [https://github.com/flightaware/dump1090/blob/master/README.adaptive-gain.md#default-settings](https://github.com/flightaware/dump1090/blob/master/README.adaptive-gain.md#default-settings)**

## Where to configure adaptive gain options

How to configure adaptive gain varies depending on how you have installed dump1090.

### If you are using a PiAware sdcard image, adaptive gain can be configured by editing `/boot/piaware-config.txt` or by using the `piaware-config` command.

### If you are using the Debian package, adaptive gain can be configured by editing `/etc/default/dump1090-fa` .

If running dump1090 directly, adaptive gain options are set directly by command-line options.

## Default settings

For new PiAware or Debian package installations, adaptive dynamic range mode is enabled by default and adaptive burst mode is disabled by default.

For _upgrades_ of PiAware or the Debian package from versions older than 6.0, both adaptive gain modes are disabled by default.

These defaults can be overridden as described below.

## Adaptive gain in dynamic range mode

The dynamic range adaptive gain mode attempts to set the receiver gain to maintain a given dynamic range - that is, it tries to set the gain so that general noise is at or below a given level. This takes into account different or changing RF environments and different receiver hardware (antenna, preamplifiers, etc) that affects the overall gain of the system, and usually will pick a reasonable gain setting without intervention.

To enable this mode:

- Set `adaptive-dynamic-range yes` in piaware-config; or
- Set `ADAPTIVE_DYNAMIC_RANGE=yes` in `/etc/default/dump1090-fa` ; or
- Pass the `--adaptive-range` option on the command line.

The default settings for dynamic range will use a dynamic range target chosen based on SDR type (e.g. 30dB for rtlsdr receivers). This is usually a good default. To override this target:

- Set `adaptive-dynamic-range-target` in piaware-config; or
- Set `ADAPTIVE_DYNAMIC_RANGE_TARGET` in `/etc/default/dump1090-fa` ; or
- Pass the `--adaptive-range-target` option on the command line.

## Adaptive gain in “burst” / loud signal mode

The “burst” adaptive gain mode listens for loud bursts of signal that were _not_ successfully decoded as ADS-B messages, but which have approximately the right timing to be possible messages that were lost due to receiver overloading. When enough overly-loud signals are heard in a short period of time, dump1090 will _reduce_ the receiver gain to try to allow them to be received.

This is a more situational setting. It may allow reception of loud nearby aircraft (e.g. if you are close to an airport). The tradeoff is that when there are nearby aircraft, overall receiver range may be reduced. Whether this is a good tradeoff depends on the aircraft you’re interested in. By default, adaptive gain burst mode is disabled.

To enable burst mode:

- Set `adaptive-burst yes` in piaware-config; or
- Set `ADAPTIVE_BURST=yes` in `/etc/default/dump1090-fa` ; or
- Pass the `--adaptive-burst` option on the command line.

This mode is more experimental than the dynamic range mode and tweaking of the advanced burst options may be needed depending on your local installation. In particular, `--adaptive-burst-loud-rate` and `adaptive-burst-quiet-rate` may need adjusting. Feedback on what works for you and what doesn’t would be appreciated!

Burst mode and dynamic range mode can be enabled at the same time.

## Limiting the gain range

If you know in advance approximately what the gain setting should be, so you want to allow adaptive gain to change the gain only within a certain range, you can set minimum and maximum gain settings in dB. Adaptive gain will only adjust the gain within this range. To set this:

- Set `adaptive-min-gain` and `adaptive-max-gain` in piaware-config; or
- Set `ADAPTIVE_MIN_GAIN` and `ADAPTIVE_MAX_GAIN` in `/etc/default/dump1090-fa` ; or
- Pass the `--adaptive-min-gain` and `--adaptive-max-gain` options on the command line.

If you know approximately where the gain should be, then a good starting point would be to set the max and min adaptive gain to +/- 10dB around your gain setting.

---

_[View the full topic](https://discussions.flightaware.com/t/enabling-auto-gain/79065)._
