Mar-25-2025, 10:40 PM
Hiya,
I have been working on a wildlife tracking project which reads in a stream of data from a Software Defined Radio (SDR - AirspyHF) and need to change a frequency every x seconds on the attached SDR (Its a kinda neat project, volunteer, non profit).
The current working main branch is here : https://github.com/bigalnz/test_fft/tree/main
The question is, how and where to put the code to change from frequency 1 to frequency 2 after x seconds, then change back again when x seconds is up.
For example if the program is started with :
Then it starts with freq 160425000 Hz and waits 80 seconds before changing to 160500100 and then after another 80 seconds swaps back.
The current code if I understand it correctly has a
What would this timer code look like? Where should it go?
Sorry for all the basic questions but the existing code was not my work. If further clarification is required please let me know.
I have been working on a wildlife tracking project which reads in a stream of data from a Software Defined Radio (SDR - AirspyHF) and need to change a frequency every x seconds on the attached SDR (Its a kinda neat project, volunteer, non profit).
The current working main branch is here : https://github.com/bigalnz/test_fft/tree/main
The question is, how and where to put the code to change from frequency 1 to frequency 2 after x seconds, then change back again when x seconds is up.
For example if the program is started with :
--center 160425000 --alternate-freq 160500100 --freq-change-interval 80
Then it starts with freq 160425000 Hz and waits 80 seconds before changing to 160500100 and then after another 80 seconds swaps back.
The current code if I understand it correctly has a
sample_config
instance of the SampleConfig
class inside sample_reader module : https://github.com/bigalnz/test_fft/blob...sdr.py#L28 and I think all I need to do is change sample_config.center_freq
which would then update the SDR?What would this timer code look like? Where should it go?
Sorry for all the basic questions but the existing code was not my work. If further clarification is required please let me know.