/* * Program: Global Communicator II - scanner signals converter * Programmer: Robert John Morton UK-YE572246C * Date: Tue 22 Sep 2020 From the directory in which 40.c resides: to compile: gcc 40.c -o 40 */ #include // input output to/from the console and keyboard #include // standard functions for the 'C' language int S[300] = { // signal strength per channel 2, 12, 25, 35, 50, 35, 25, 22, 30, 43, // CW channels 30, 22, 24, 33, 47, 33, 24, 82, 32, 45, 32, 22, 16, 89, 26, 37, 36, 19, 25, 35, 50, 35, // LSB channels 25, 72, 30, 60, 30, 77, 40, 20, 35, 50, 35, 30, 45, 30, // AM channels 35 }; void main() { FILE *HS = fopen("scope.dat","rb+"); // open the output file for writing fseek(HS,7000,SEEK_SET); // seek start byte for Top Band int i, c; /* For the CW part of the band from 7000 to 7044.9 kHz there are 22 'channels' of 2 kHz each. The 1st 1kHz slot is noise and the 2nd 1kHz slot is a CW signal. */ for(i = 0; i < 22; i++) { // for each CW channel fputc(3,HS); // put the inter-channel noise level fputc(S[i],HS); // put the peak-held signal strength } fputc(3,HS); // put the inter-channel noise level fputc(3,HS); // put the inter-channel noise level /* For the LSB part of the band from 7045 to 7099.9 kHz there are 13 channels of 4 kHz each. The 1st 1kHz slot is noise and the following 3 contain 3 1kHz sideband signal slots. */ for(i = 22; i < 35; i++) { // for each LSB channel int c = S[i]; // get the required sample fputc(3,HS); // put the inter-channel noise level fputc(c * 0.82,HS); // peak-held outer sideband signal strength fputc(c * 0.95,HS); // peak-held middle sideband signal strength fputc(c,HS); // peak-held inner signal strength } fputc(3,HS); // put the inter-channel noise level fputc(3,HS); // put the inter-channel noise level fputc(3,HS); // put the inter-channel noise level /* For the AM part of the band from 7045 to 7099.9 kHz there are 12 channels of 8 kHz each. The 1st 1kHz slot is noise and the following 7 contain 6 1kHz sideband slots + a central carrier signal slot. */ for(i = 35; i < 47; i++) { // for each AM channel int c = S[i]; // get the required sample fputc(3,HS); // put the inter-channel noise level fputc(c * 0.71,HS); // peak-held outer sideband signal strength fputc(c * 0.82,HS); // peak-held middle sideband signal strength fputc(c * 0.95,HS); // peak-held inner sideband signal strength fputc(c,HS); // peak-held full signal strength fputc(c * 0.95,HS); // peak-held inner sideband signal strength fputc(c * 0.82,HS); // peak-held middle sideband signal strength fputc(c * 0.71,HS); // peak-held outer sideband signal strength } fclose(HS); // close the output file }