/* * 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 15.c -o 15 */ #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, 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, 74, 71,100, 71, 67, 95, 67, 28, 39, 36, 25, 50, 47, 47, 50, 37, 53, 52, 37, 2, 50, 35, 25, 26, 37, 53, 37, 26, 24, 35, 49, 35, 24, 21, 30, 43, 30, 21, 26, 38, 52, 38, 26, 24, 34, 48, 34, 24, 2, 2, 35, 50, 35, 25, 22, 30, 43, 30, 22, 24, 19, 26, 37, 26, 19, 25, 35, 50, 35, 25, 2, 18, 25, 35, 50, 35, 25, 18, 17, 24, 27, 19, 39, 55, 78,110, 78, 55, 39, 71, 100, 71, 33, 46, 66, 93, 66, 46, 33, 25, }; void main() { FILE *HS = fopen("scope.dat","rb+"); // open the output file for writing fseek(HS,21000,SEEK_SET); // seek start byte for Top Band int i, c; /* For the CW part of the band from 21000 to 21150 kHz there are 75 'channels' of 2 kHz each. The 1st 1kHz slot is noise and the 2nd 1kHz slot is a CW signal. */ for(i = 0; i < 75; 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 21150 to 21450 kHz there are 75 channels of 4 kHz each. The 1st 1kHz slot is noise and the following 3 contain 3 1kHz sideband signal slots. */ for(i = 75; i < 150; 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 fclose(HS); // close the output file }