Spur table extended

tinySA
erikkaashoek 6 years ago
parent 3558543dea
commit cc536a4787

@ -632,16 +632,38 @@ static const unsigned int spur_alternate_IF = 434000000;
static const int spur_table[] = static const int spur_table[] =
{ {
580000, 580000,
961000,
1600000, 1600000,
1834000, 1837000,
2755000,
2961000,
4933000, 4933000,
4960000, 4960000,
6961000,
6980000,
8267000,
8961000,
10000000, 10000000,
10960000, 10960000,
11600000,
16960000, 16960000,
22960000, 22960000,
28960000, 28960000,
/*
0.52
6.96
1.84
2.77
4934
4960
8928
7371
/* /*
870000, 870000,
970000, 970000,
@ -699,8 +721,9 @@ int avoid_spur(int f)
// window = 50000; // window = 50000;
if (! setting_mode == M_LOW || frequency_IF != spur_IF || actual_rbw > 300.0) if (! setting_mode == M_LOW || frequency_IF != spur_IF || actual_rbw > 300.0)
return(false); return(false);
f = f + window/2;
for (unsigned int i = 0; i < (sizeof spur_table)/sizeof(int); i++) { for (unsigned int i = 0; i < (sizeof spur_table)/sizeof(int); i++) {
if (f/window == spur_table[i]/window) { if (f/window == (spur_table[i] + window/2)/window) {
// spur_old_stepdelay = actualStepDelay; // spur_old_stepdelay = actualStepDelay;
// actualStepDelay += 4000; // actualStepDelay += 4000;
return true; return true;
@ -757,7 +780,8 @@ float perform(bool break_on_operation, int i, int32_t f, int tracking)
float RSSI = -150.0; float RSSI = -150.0;
int t = 0; int t = 0;
do { do {
int lf = (uint32_t)(f + (int)(t * 500 * actual_rbw)); int lf = (uint32_t)(f + (int)((t * 500 - vbwSteps * 250) * actual_rbw));
if (lf < 0) lf = 0;
if (setting_mode == M_LOW && tracking) { if (setting_mode == M_LOW && tracking) {
setFreq (0, frequency_IF + lf - reffer_freq[setting_refer]); // Offset so fundamental of reffer is visible setFreq (0, frequency_IF + lf - reffer_freq[setting_refer]); // Offset so fundamental of reffer is visible
local_IF = frequency_IF ; local_IF = frequency_IF ;

Loading…
Cancel
Save

Powered by TurnKey Linux.