Good Morning, I have with some generous help from others managed to get my wildlife tracker processing signals in Python.
By way of background I am trying to workout the time between CW pulses on 160Mhz where the pulses are at 80 / per min (1.33/s) 48 / min (0.8/s) or 30 /min (0.5/s) and the signal strength of each pulse and for the moment output to console in near real-time. So goals: 1. Output beeps per minute (80/48/30) 2. Output sigal strength for each beep 3. Calculate beep high state duration is 0.0176s (validation from noise) 4. Make the logic resilient to handle samples that may have no beeps in them So far it outputs: BPM: 80.0 RSSI: 1.04 BPM: 80.0 RSSI: 104. I am capturing at 2.4e6 and after decimation the samp_rate is 24e3. There is a loop in the code which finds rising edge, falling edge and then when it find another rising edge, the calculation's are done for beep interval and RSSI. A rolling index keeps the calculations stateful between chunks. Problems: 1. If the chunk happens to end in the middle of a beep the RSSI calculation is wrong since the rssi needs to mean the high state of the beep and half the beep is in the previous chunk which is not kept. 2. I probably needs some optimisation and when it runs, its a bit/start stop'ish 3. Would threading help here? The way it is at the moment I am not sure it is reading in next sample while processing current sample. The full code is here : https://github.com/bigalnz/test_fft/blob/main/test_fft.py Many thanks in advance, Al