From f9dba5813fde5f078f1e4b81d586e0707429ba4d Mon Sep 17 00:00:00 2001 From: 30hours Date: Wed, 11 Sep 2024 15:28:49 +0000 Subject: [PATCH] Add Rsp config notes and fix max gain reduction --- config/radar4.yml | 8 ++++---- src/capture/rspduo/README.md | 6 +++--- src/capture/rspduo/RspDuo.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/radar4.yml b/config/radar4.yml index 76fff54..5c69164 100644 --- a/config/radar4.yml +++ b/config/radar4.yml @@ -3,10 +3,10 @@ capture: fc: 204640000 device: type: "RspDuo" - agcSetPoint: -60 - bandwidthNumber: 50 - gainReduction: 40 - lnaState: 4 + agcSetPoint: -20 + bandwidthNumber: 5 + gainReduction: 59 + lnaState: 1 dabNotch: false rfNotch: false replay: diff --git a/src/capture/rspduo/README.md b/src/capture/rspduo/README.md index 764230f..c6019d2 100644 --- a/src/capture/rspduo/README.md +++ b/src/capture/rspduo/README.md @@ -6,11 +6,11 @@ Here is a list of available config parameters: - **agcSetPoint** in dBfs has a default value of -60 dBfs, and can be set between -72 dBfs and 0 dBfs. -- **bandwidthNumber** in Hz has a default value of 50 Hz, and can be 0, 5, 50 or 100 Hz. +- **bandwidthNumber** in Hz has a default value of 50 Hz, and can be 0, 5, 50 or 100 Hz. This is the number of times per second the AGC makes gain adjustments by changing the gain reduction value. If setting to 0 then the AGC is effectively disabled. -- **gainReduction** in dB has a default value of 40 dB, and can be set between 20 and 60. +- **gainReduction** in dB has a default value of 40 dB, and can be set between 20 and 59. This is the initial value the gain reduction is set to, before the AGC changes this parameter to approach the AGC set point. -- **lnaState** has a default value of 4, must be between 1 and 9. +- **lnaState** has a default value of 4, must be between 1 and 9. A larger number means a larger gain reduction (attenuation). Maximum gain at LNA state 1 and minimum gain at LNA state 9. - **dabNotch** is a bool, true turns on the DAB band notch filter (default false). diff --git a/src/capture/rspduo/RspDuo.cpp b/src/capture/rspduo/RspDuo.cpp index 44066c4..75f1aab 100644 --- a/src/capture/rspduo/RspDuo.cpp +++ b/src/capture/rspduo/RspDuo.cpp @@ -16,7 +16,7 @@ const double RspDuo::MAX_FREQUENCY_NR = 2000000000; const int RspDuo::MIN_AGC_SET_POINT_NR = -72; // min agc set point const int RspDuo::MIN_GAIN_REDUCTION_NR = 20; // min gain reduction -const int RspDuo::MAX_GAIN_REDUCTION_NR = 60; // max gain reduction +const int RspDuo::MAX_GAIN_REDUCTION_NR = 59; // max gain reduction const int RspDuo::MAX_LNA_STATE_NR = 9; // max lna state const int RspDuo::DEF_SAMPLE_RATE_NR = 2000000; // default sample rate