Name | Modified | Size | Downloads / Week |
---|---|---|---|
Readme.txt | 2019-10-22 | 2.2 kB | |
aptdecoder.c | 2019-08-10 | 13.1 kB | |
Totals: 2 Items | 15.3 kB | 0 |
Simple APT Decoder Readme The software is made in C/C++ once compiled it will run as a console application. The software should decode an APT waves files into a BMP image that is fixed 2080 columns x 2080 rows. to run from the console type : ./simpleaptdecoder filename.wav after running the BMP image will be generated in the same directory of the original wave file. several parameter are taken by default but can be managed as parameter running the command Wave file path: should be the first parameter if none is provided the default is “./sndef.wav” m : intensity multiply pixel color component default is 1.0 s : skip number of pixels in image default is 0 h : sampling Frequency default is 11025.0 Hz r : rotation o orizontal v vertical z both default is 0 w : wave width 1 byte 2 byte default is 1 c : APT subcarrier default is 2400.0 hz t : Pixel per second default is 4160.0 l : Pixel per linee default is 2080 Decoder algorithm: N sampling Frequency = 11025 second F Data Frequency = 2400 Hz second P = 3.1415926536 Assuming the data are Modulated on a circle instead of a Sine Wave the angle of the arc related to a sample is calculated as: A = 2 * P * F / N ( 2 * 3.1415926536 * 2400 / 11025) Rotating a Sample for the angle of A it results to a simulated next sample that has no signal change with the old one; comparing the simulate sample with the true new sample read from data (wave file) it is possible to calculate how much the signal has been changed from the previous one. subtracting the two samples gives the demodulation process. Rotating formula: x1 = x0 * cos(A) - y0 * sin(A) y1 = x0 * sin(A) + y0 * cos(A) The round errors and calculating the not precise sampling date in wave file, brings demodulation containing aliasing. The sampling frequency used in the Wave files , (in the example 11025), looks not to be precise and often it should be adjusted as the algorithm does not make a Fourier transformation but try to decode using the sampling frequency.