Spectrum Analyzer [004]

Spectrum Analyzer [004]

I put AM demodulation on hold for a moment and moved some code around so that I can better support demodulation later. In the new system (there's no point in dwelling on the particulars of the old system), the device read thread passes a newly received block of data to each registered handler by pushing it onto the handler's receive queue, which is both lock-free and wait-free, so the device read thread will never block for long, which is good since the device itself (or is it the FTDI driver?) is prone to over-flowing and corrupting its own buffer if it's neglected for very long (and by "very long" I mean milliseconds).

One thread exists for each data handler, and there is one data handler for each output method. An output method could be a graph, recording operation or a demodulator. The data handler's thread pop's the data block off its incoming data queue, creates a local copy of the data and releases the data block. The dsp chain (a series of data manipulation processes) is then called, which, in the case of the planar graph is first a hamming window function, a fourier transform, conversion to dBm, averaging and then smoothing. Finally, the result is rendered (drawn, saved, played, etc.).

The end result is that even though more work is being performed (a separate dsp chain for each graph, for instance), the actual cpu time dropped from the equivalent of 120% of one cpu core to 65%.

--

I decided to find out what some heavy compiler optimization would do. I bumped clang's optimization to -O3 and ... I got nothing. Literally. No output at all. I traced the problem all the way back to the ftd2xx.dylib function FT_Read(), which was content to just return a lot of zeroes. As soon as I re-build with optimizations disabled, the data magically re-appears. I've got absolutely no idea what's going on here. Some sort of binary incompatibility between clang-optimized binaries and the dylib from FTDI?

--

In lieu of a screenshot depicting development progress, here's a picture of 750 KHz. It's very different from anything else I've seen before.

Oh, and I also found an amateur radio satellite at amsat that was due to pass overhead last night while broadcasting around 29 MHz (which is within range of my receiver), and I was hoping to see some doppler shift, but I didn't see any signal at all. There don't seem to be many satellites broadcasting below 30 MHz.

Subscribe to A garage sale for your mind

Don’t miss out on the latest posts. Sign up now to get access to the library of members-only posts.
[email protected]
Subscribe