mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
gain adjust for frequency
This commit is contained in:
parent
a4ef290126
commit
bcb0644070
8
dsp.c
8
dsp.c
|
|
@ -84,6 +84,7 @@ dsp_process(int16_t *capture, size_t length)
|
|||
void
|
||||
calculate_gamma(float gamma[2])
|
||||
{
|
||||
#if 1
|
||||
// calculate reflection coeff. by samp divide by ref
|
||||
float rs = acc_ref_s;
|
||||
float rc = acc_ref_c;
|
||||
|
|
@ -93,6 +94,13 @@ calculate_gamma(float gamma[2])
|
|||
float sc = acc_samp_c;
|
||||
gamma[0] = (sc * rc + ss * rs) / rr;
|
||||
gamma[1] = (ss * rc - sc * rs) / rr;
|
||||
#elif 0
|
||||
gamma[0] = acc_samp_s;
|
||||
gamma[1] = acc_samp_c;
|
||||
#else
|
||||
gamma[0] = acc_ref_s;
|
||||
gamma[1] = acc_ref_c;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
6
main.c
6
main.c
|
|
@ -136,8 +136,12 @@ int set_frequency(int freq)
|
|||
tlv320aic3204_set_gain(95, 95);
|
||||
delay += 10;
|
||||
} else
|
||||
if (freq > 600000000 && frequency <= 600000000) {
|
||||
tlv320aic3204_set_gain(60, 60);
|
||||
delay += 10;
|
||||
} else
|
||||
if (freq > FREQ_HARMONICS && frequency <= FREQ_HARMONICS) {
|
||||
tlv320aic3204_set_gain(30, 30);
|
||||
tlv320aic3204_set_gain(40, 40);
|
||||
delay += 10;
|
||||
} else
|
||||
if (freq <= FREQ_HARMONICS && frequency > FREQ_HARMONICS) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue