Updated jump corrections

SI443_RBW_update
erikkaashoek 4 years ago
parent f24275fff8
commit a8ac5c0044

@ -981,7 +981,8 @@ config_t config = {
.harmonic_level_offset = 7,
.shift_level_offset = -0.5,
.drive1_level_offset = -1,
.drive2_level_offset = -1.5,
.drive2_level_offset = -2.5,
.drive3_level_offset = -3,
.correction_frequency =
{
{ 10000, 100000, 1000000, 5000000, 15000000, 30000000, 145000000, 400000000, 720000000, 800000000, 800000001, 1519000000, 1527000000, 3000000000, 3500000000, 4000000000, 4500000000, 5000000000, 5500000000, 6000000000 }, // low in
@ -1181,7 +1182,7 @@ VNA_SHELL_FUNCTION(cmd_hop)
int old_vbwSteps = vbwSteps;
// vbwSteps = 1;
for (freq_t f = start; f <= stop; f += step) {
if (mask & 1) shell_printf("%Q ", f);
if (mask & 1) shell_printf("%U ", f);
float v = PURE_TO_float(perform(false, 0, f, false));
if (mask & 2) shell_printf("%f ", v);
shell_printf("\r\n");

@ -135,14 +135,17 @@
#define HIGH_MIN_FREQ_MHZ 136// 825
#define HIGH_MAX_FREQ_MHZ 1130
#define MINIMUM_DIRECT_FREQ 830000000ULL
#define ULTRA_MAX_FREQ 5350000000ULL
#define ULTRA_MAX_FREQ 5350000000ULL // Start of harmonic mode
#define ULTRA_AUTO 10000000000ULL // 10GHz
//#define ULTRA_MAX_FREQ 2900000000ULL
#define MAX_LO_FREQ 4350000000ULL
#define MAX_ABOVE_IF_FREQ 3350000000ULL
#define MIN_BELOW_IF_FREQ 2300000000ULL
#define MAX_ABOVE_IF_FREQ 3350000000ULL // Range to use for below IF
#define MIN_BELOW_IF_FREQ 2300000000ULL // Range to use for below IF
//#define LOW_MAX_FREQ 800000000ULL
#define MIN_BELOW_LO 550000000ULL
#define MIN_BELOW_LO 550000000ULL // not used????
#define DRIVE0_MAX_FREQ 600000000ULL // LO drive 0
#define DRIVE1_MAX_FREQ 1200000000ULL // LO drive 1
#define DRIVE2_MAX_FREQ 2000000000ULL // LO drive 2
#ifdef __NEW_SWITCHES__
#define DIRECT_START config.direct_start
#define DIRECT_STOP config.direct_stop
@ -711,6 +714,7 @@ typedef struct config {
float shift_level_offset;
float drive1_level_offset;
float drive2_level_offset;
float drive3_level_offset;
#endif
#ifdef __NOISE_FIGURE__
float noise_figure;

@ -338,7 +338,7 @@ VNA_SHELL_FUNCTION(cmd_leveloffset)
{
// 0 1 2
#ifdef TINYSA4
static const char cmd_mode_list[] = "low|high|switch|receive_switch|lna|harmonic|shift|drive1|drive2";
static const char cmd_mode_list[] = "low|high|switch|receive_switch|lna|harmonic|shift|drive1|drive2|drive3";
#else
static const char cmd_mode_list[] = "low|high|switch|receive_switch";
#endif
@ -356,6 +356,7 @@ VNA_SHELL_FUNCTION(cmd_leveloffset)
shell_printf(p, "shift", config.shift_level_offset);
shell_printf(p, "drive1", config.drive1_level_offset);
shell_printf(p, "drive2", config.drive2_level_offset);
shell_printf(p, "drive3", config.drive3_level_offset);
#endif
return;
}
@ -378,6 +379,7 @@ VNA_SHELL_FUNCTION(cmd_leveloffset)
case 6: config.shift_level_offset = v; break;
case 7: config.drive1_level_offset = v; break;
case 8: config.drive2_level_offset = v; break;
case 9: config.drive3_level_offset = v; break;
#endif
default: goto usage;
}

@ -1805,13 +1805,13 @@ pureRSSI_t get_frequency_correction(freq_t f) // Frequency dependent RSSI c
if (setting.mode == M_LOW) {
switch(actual_drive) {
case 1:
cv += float_TO_PURE_RSSI(-1);
cv += float_TO_PURE_RSSI(config.drive1_level_offset);
break;
case 2:
cv += float_TO_PURE_RSSI(-1.5);
cv += float_TO_PURE_RSSI(config.drive2_level_offset);
break;
case 3:
cv += float_TO_PURE_RSSI(-2);
cv += float_TO_PURE_RSSI(config.drive3_level_offset);
break;
}
if (ultra && f > ultra_threshold) {
@ -3812,11 +3812,11 @@ again: // Spur redu
if (actual_drive & 0x04){ // Automatic mixer drive
if (LO_harmonic)
actual_drive = 3;
else if (lf < 600000000ULL) // below 600MHz
else if (lf < DRIVE0_MAX_FREQ) // below 600MHz
actual_drive = 0;
else if (lf < 1200000000ULL) // below 1.2GHz
else if (lf < DRIVE1_MAX_FREQ) // below 1.2GHz
actual_drive = 1;
else if (lf < 2000000000ULL) // below 2GHz
else if (lf < DRIVE2_MAX_FREQ) // below 2GHz
actual_drive = 2;
else
actual_drive = 3;

Loading…
Cancel
Save

Powered by TurnKey Linux.