From 5d0d29aa86f0bb203c8442fe653d5d6863ae599f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 23:34:21 -0400 Subject: [PATCH] Update auto-tune.py switch to 1e6 --- groundstation/auto-tune.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 86884b0d..ead2ddbb 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -16,7 +16,7 @@ if __name__ == "__main__": if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): graph = 'y' - sampling_rate = 1024e3 # 250e3 # Hz + sampling_rate = 1e6 #1024e3 # 250e3 # Hz duration = 65536/sampling_rate # 1 # seconds t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) @@ -80,7 +80,8 @@ if __name__ == "__main__": # print(sampling_rate) # print(center_frequency) - offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) +# offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) + offset = np.argmax(x) - 2000 freq_max = center_frequency + offset + 2000 print(f" {freq_max:.0f} {max_value:.0f}")