Hi,

I am attempting a WSPR decoder on a single board computer using its analog to digital converter for sampling. It won't be able to do 12,000 samples per second. Looking a /wsprd/ I see it reduces the /wav/ file by a large factor. It also looks like the /C2/ processing only use 375 complex samples / second. Working with a lower sampling rate should be possible.

I tried decimating the /wav/ file and adjusting /wsprd/ to accept the reduced set of samples to check the validity of the /wav/ input. Then I can test my code using the decimated /wav/ file before moving over to the SBC.

I adjusted the calculations for sizes in /readwavfile/. See code an output below. It worked for reductions by 2 and 3, although the latter only decoded 2 of the 3 spots in the file. When I tried 4 it /segment faults/ in the loop that transfers /fftout/ to /fftin/.

I can't see why it is faulting. The sizes for the arrays look okay from the values I output. I have done some DSP and FFT more than a few years ago so the general concepts are there. But I may be missing details.

Here's the code and output for reduce by 2 and then reduction by 4, which faults. Any thoughts or suggestions on a better way to handle this testing? Also, pointers to other WSPR decoding code?

    nfft2 = 46080; //this is the number of downsampled points that will be returned

    nh2 = nfft2 / 2;

    double deci = 4.0;

    if (ntrmin == 99) {
        nfft1 = nfft2 * (32 / deci);
        df = (12000.0 / deci) / nfft1;
        i0 = 1500.0 / df + 0.5;
        npoints = 114 * (12000 / deci);
        fprintf(stderr, "%f %d %d %d %d %ld %f\n", deci, nfft1, nfft2, nh2, i0, npoints, df);
    }

Output:

2.000000 737280 46080 23040 184320 684000 0.008138

4.000000 368640 46080 23040 184320 342000 0.008138

--

-73 -
*Rud Merriam K5RUD*
/Mystic Lake Software/ <http://mysticlakesoftware.com/>

_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to