/* * Program: Global Communicator II - scanner signals converter * Programmer: Robert John Morton UK-YE572246C * Date: Tue 22 Sep 2020 From the directory in which 15.c resides: to compile: gcc 20.c -o 20 */ #include // input output to/from the console and keyboard #include // standard functions for the 'C' language int S[301] = { // signal strength per pseudochannel 2, 30, 50, 30, 20, 40, 20, 35, 50, 35, 40, 25, 20, 30, 20, 30, 45, 30, 43, 50, 32, 38, 28, 31, 43, 31, 43, 50, 41, 37, 74, 71,100, 71, 67, 95, 67, 28, 39, 36, 49, 35, 24, 21, 30, 43, 30, 21, 26, 38, 52, 38, 26, 24, 34, 48, 34, 24, 2, 30, 35, 50, 35, 25, 22, 30, 43, 30, 22, 24, 27, 19, 39, 55, 78,110, 78, 55, 39, 71, 62, 15 }; void main() { FILE *HS = fopen("scope.dat","rb+"); // open the output file for writing fseek(HS,14000,SEEK_SET); // seek start byte for Top Band int i, c; /* For the CW part of the band from 14000 to 14070 kHz there are 35 'channels' of 2 kHz each. The 1st 1kHz slot is noise and the 2nd 1kHz slot is a CW signal. */ for(i = 0; i < 35; 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 USB part of the band from 14070 to 14100 kHz there are 7 channels of 4 kHz each. The 1st 1kHz slot is noise and the following 3 contain 3 1kHz sideband signal slots. */ for(i = 35; i < 42; 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 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 = 42; i < 82; 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.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(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 fputc(3,HS); // put the inter-channel noise level fputc(3,HS); // put the inter-channel noise level fclose(HS); // close the output file }