# Turning raw APT data into an image

I apologize if this question is a little out of scope for the amateur radio stack exchange but I feel like it fit better here than over in any other forum.

I have successfully parsed raw PCM data out of a WAV file representing the signal received from one of NOAA's satellites in APT format. Since its bit rate is 16 bit I combined sequential pairs of bytes into 16 bits using simple bit shifting. I understand these values represent sampled amplitudes.

What I am trying to figure out is where to go from here. I don't really want to use a normal application as most of them are proprietary, and being a ham operator I feel like programming an APT demodulator would be a useful exercise as a rite of passage.

I've done some digging around and have read the APT specification, but it doesn't quite give any clues on what I need to do to transform the signal into the appropriate image. I've read around on other forums, and it seems I need an AM demodulator and some form of an FFT to get it to where I need to be - however I am brand new to this stuff. I come from a computer science and math background so I can definitely handle the learning curve. I'm just about through with my amateur extra exam and the knowledge in there seems have left me with little to work with in this regard. I am willing to dig in but I have to know where to start!

Can anyone provide me any resources on how I can begin to learn how to transform these signals in the raw PCM data to the images I need? . I'd really appreciate it!

• @captcha Unfortunately those are where I started :(. The problem I have isn't the protocol, it's extracting the signal so I can parse the image out of it unfortunately. I realize this will take some DSP but I have no idea where to start...I've considered just picking up a textbook and teaching myself as much as I can for the next 3-4 months. – CL40 Nov 12 '19 at 22:10
• What math processing do you plan to use? (Fortran? Python? Mathematica? ...?) – Chris K8NVH Nov 14 '19 at 16:58
• @ChrisK8NVH I have been writing it in C. Fortran might've been a smarter choice given the abundance of resources but I really, really like C and I figured I'd be programming the FFT and stuff myself anyway (for learning). – CL40 Nov 15 '19 at 1:34
• Got it. You might consider using python, Matlab, or some higher level system to make the programming easier, there are many libraries out there well defined. Once you have something working you can re-write it however you like with the benefit of having a known-working thing with which to compare. Regarding the signal processing side, others here can answer that far better than I. – Chris K8NVH Nov 15 '19 at 2:22

Edit: Others around the web have pointed out that you can sample the audio at 9.6 kHz and get 4 samples per wave, take any two consecutive samples $$x_{_1}$$ and $$x_{_2}$$, and get the carrier amplitude with $$A = \sqrt{{x_{_1}}^2 + {x_{_2}}^2}$$ .