/* * 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 80.c -o 80 */ #include // input output to/from the console and keyboard #include // standard functions for the 'C' language int S[300] = { // signal strengths 2, 30, 50, 30, 20, 40, 20, 35, 50, 35, // CW channels 30, 45, 30, 35, 50, 35, 20, 35, 20, 25, 40, 25, 20, 30, 20, 30, 45, 30, 43, 50, 43, 45, 55, 45, 45, 50, 45, 41, 47, 41, 32, 38, 28, 31, 43, 31, 43, 50, 41, 37, 50, 50, 30, 45, 30, 71,100, 71, 74,105, 5, 71,100, 71, 67, 95, 67, 28, 39, 36, // LSB channels 25, 50, 47, 47, 50, 37, 53, 52, 37, 2, 35, 25, 17, 23, 33, 47, 33, 23, 65, 35, 50, 35, 25, 26, 37, 53, 37, 26, 24, 35, 49, 75, 24, 21, 10 }; void main() { FILE *HS = fopen("scope.dat","rb+"); // open the output file for writing fseek(HS,3500,SEEK_SET); // seek start byte for Top Band int i, c; /* For the CW part of the band from 3500 to 3619.9 kHz there are 60 'channels' of 2 kHz each. The 1st 1kHz slot is noise and the 2nd 1kHz slot is a CW signal. */ for(i = 0; i < 60; i++) { // for each CW channel fputc(3,HS); // put the inter-channel noise level fputc(S[i],HS); // put the peak-held signal strength } /* For the LSB part of the band from 3620 to 3800 kHz there are 45 channels of 4 kHz each. The 1st 1kHz slot is noise and the following 3 contain 3 1kHz sideband signal slots. */ for(i = 60; i < 105; i++) { // for each LSB channel fputc(3,HS); // put the inter-channel noise level c = S[i]; // get signal strength for this channel fputc(c * 0.82,HS); // peak-held outer sideband signal strength fputc(c * 0.95,HS); // peak-held inner sideband signal strength fputc(c,HS); // peak-held full signal strength } fclose(HS); // close the output file }