I've been working on a decoder for these APT images for a while now. I started years ago, in Python, and was able to implement a working decoder quickly. A few months ago, I came back to the project and decided to move to C++. I have not been making good progress, and I don't know what I am doing wrong.
See here for a description of the signal. Briefly, 256-level 4160 Bd image data is amplitude modulated onto a 2400-Hz subcarrier, which is frequency modulated onto a 137-MHz RF carrier.
Question the first: how is it possible (or rather, how it is meaningful) to use a carrier with frequency lower than the message? Is my misunderstanding perhaps to do with the frequency content of the message itself, rather than the rate it has been sampled at? Or something else?
I have the signal stored as a WAV file, 16-bit LPCM at 20800 Hz. I read these samples into an array, working one line of decoded image at a time. APT is two lines per second, so my array contains 10400 elements.
Now, the problem seems to come down to AM demodulation. It is my understanding that the proper way to do this is via computing the magnitude of the analytic signal. I do so by taking the DFT of my array, setting the negative frequency components to zero, and doubling the positive elements. Then iDFT back, and take the magnitudes as the demodulated signal.
I do some median filtering, do a naïve low-pass by zeroing bins in DFT, scale to 256 levels, and generate an image. Seems relatively simple -- so why does the output look so horrible? I am not sure what else to try. From my explanation, is there something I am doing I ought not be, etc.?
The bars on the right side look to me to be the telemetry frames, so it seems that my process is "working" in some sense. I'm not sure what the source of the high-frequency "circle" curves are you can see in the image.