/* * Program: Global Communicator II - scanner signals converter * Programmer: Robert John Morton UK-YE572246C * Date: Tue 22 Sep 2020 From the directory in which conv.c resides: to compile: gcc TB.c -o TB */ #include // input output to/from the console and keyboard #include // standard functions for the 'C' language FILE *F; int S[190] = { // signal strength profile of the Top Band 3, 4, 5, 7, 9,11,21,32,77,90,95,96,99,97,95,91,79,78,74,70, 67,66,65,61,58,22,21,21,21,21,21,24,29,32,71,73,79,81,85,89, 94,95,96,97,96,95,94,91,87,88,20,37,40,32 }; void main() { F = fopen("scope.dat","rb+"); // open the output file for writing fseek(F,1810,SEEK_SET); // seek start byte for Top Band int i, c; /* For the CW part of the band from 1810 to 1837.9 kHz there are 14 'channels' of 2 kHz each. The 1st 1kHz slot is noise and the 2nd 1kHz slot is a CW signal. */ for(i = 0; i < 14; i++) { // for each CW channel fputc(3,F); // put the inter-channel noise level fputc(S[i],F); // put the peak-held signal strength } /* For the LSB part of the band from 1838 to 2000 kHz there are 40 channels of 4 kHz each. The 1st 1kHz slot is noise and the following 3 contain 3 1kHz sideband signal slots. */ for(i = 14; i < 54; i++) { // for each LSB channel fputc(3,F); // put the inter-channel noise level int c = S[i]; fputc(c * 0.7,F); // peak-held outer sideband signal strength fputc(c * 0.9,F); // peak-held middle sideband signal strength fputc(c,F); // peak-held inner sideband signal strength } fclose(F); // close the output file }