switch 🏴
banner
switch161.bsky.social
switch 🏴
@switch161.bsky.social
programmer, anti-fascist, and more :3
they/them, german/english
So SSTV stands for Slow Scan Television, which is a mode to transmit still images via radio, used by amateur radio operators. It encodes the pixels and a header using frequency modulation, meaning the signals in the picture are just detections of tones of different frequencies.
July 26, 2025 at 8:53 PM
AM radio is really simple. All you gotta do is multiply the radio signal with e^(-i*2*pi*f*t) to shift the frequency of the station to 0. Then lowpass filter (remove high unwanted frequencies) and decimate (drop samples to downsample to audio sample rate). That's it! Multiply and average.
July 16, 2025 at 7:36 AM
I remembered that I have a book about signal processing! With it, wikipedia and youtube all this stuff starts to make a lot of sense now!

I just got a crude AM radio receiver working 📻 🎶
July 16, 2025 at 7:36 AM
It does make sense now. The FFT outputs the complex amplitudes for frequencies f = omega / (2 * pi * T). So for the right half the complex amplitudes are just rotating with >pi/T in the opposite direction. So those are the frequencies left of the center frequency.
July 12, 2025 at 6:20 PM
Oh my goddess! I just realized the big mistake that made it look all wrong. When you do FFT you'll get first the right and then the left half of the spectrum.

The rustfft doc clearly states that it would be ordered with ascending frequency.

But my output matches SDR++ now 😀
July 12, 2025 at 6:07 AM
Fortunately my rust replacement for rtl_tcp allows multiple client connections, so I can connect my TUI app and SDR++ to it at the same time and compare them.

Unfortunately they don't match that well. Some of my math isn't mathing correctly ☹️
July 11, 2025 at 12:51 AM
I've added a little indicator that displays the frequency of your mouse position.

If I'm not mistaken (I'd have to look with a proper app like SDR++) this red stripe at 7.1 MHz is that russian over-the-horizon radar that is always on at night at that frequency.
July 11, 2025 at 12:31 AM
Hmm, stupid me. If I only need low-resolution spectra, I can just downsample the input signal, no?
July 10, 2025 at 6:17 PM
I also want to do the FFT on larger buffers to increase resolution in frequency space. For one I could then display smaller sections of the spectrum. But I also want to be able to select small frequency bands and demodulate them.
July 10, 2025 at 5:52 PM
I think it's slightly better to do the accumulation by FFTing a larger buffer and then downsampling the spectrum to terminal width. The result should be the same, but a FFT is O(n log n). So right now I have a smaller n, but do it more often - thus not benefiting from the log as much.
July 10, 2025 at 5:52 PM
So this basically takes terminal-width number of samples, FFTs them, accumulates this into a line over 500ms and then renders it to the top of the screen, pushing the old lines down.
July 10, 2025 at 5:52 PM
I wrote my own high-level bindings. They wrap the low-level C API and provide an async API with support for multiple consumers per IQ stream.

I believe it's not 100% safe the way I share the device handle between threads, but that's literally how the authors of librtlsdr use their library.
July 5, 2025 at 9:53 PM
Basic demodulation works :3
I just received a full ADS-B message with correct CRC and verified that the plane is really there.
But the demodulation still produces lots of errors, so I will work on error correction tomorrow.
July 3, 2025 at 11:56 PM
I'm testing my decoder with a 100MB dump of ADS-B messages and it can parse over 2 million messages/s which is about 28 MB/s.

To be fair, the decoder doesn't do very much. Just a some bit shuffling to put all the data in in neat little structs and enums.
July 1, 2025 at 4:46 PM
There's an endpoint to query details of a NOTAM, and that is theoretically enumerable, but the IDs currently sit at around 70 million. Those IDs are sometimes contiguous, but not completely - not sure how they're structured.
June 21, 2025 at 7:16 PM
Vulcanus is a good first planet imho. Nothing much to worry about besides having to kill one demolisher. Good luck :)

(there are easy strats to kill them if you don't mind looking it up)
June 18, 2025 at 10:21 PM