| 
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 |  |  | #ifndef COMMONS_H
 | 
					
						
							|  |  |  | #define COMMONS_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define NFFT 32768
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | extern "C" { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | extern struct {                     //This is "common/datcom/..." in Fortran
 | 
					
						
							| 
									
										
										
										
											2022-12-12 18:52:45 -05:00
										 |  |  |   float d4[2*5760000];              //Raw I/Q data from Linrad
 | 
					
						
							| 
									
										
										
										
											2023-12-07 11:43:25 -05:00
										 |  |  |   float ss[400*NFFT];               //Half-symbol spectra at 0,45,90,135 deg pol
 | 
					
						
							| 
									
										
										
										
											2022-12-12 13:56:10 -05:00
										 |  |  |   float savg[NFFT];                 //Avg spectra at 0,45,90,135 deg pol
 | 
					
						
							| 
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 |  |  |   double fcenter;                   //Center freq from Linrad (MHz)
 | 
					
						
							|  |  |  |   int nutc;                         //UTC as integer, HHMM
 | 
					
						
							| 
									
										
										
										
											2023-01-16 17:45:14 -05:00
										 |  |  |   float fselected;                  //Selected frequency for nagain decodes
 | 
					
						
							| 
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 |  |  |   int mousedf;                      //User-selected DF
 | 
					
						
							|  |  |  |   int mousefqso;                    //User-selected QSO freq (kHz)
 | 
					
						
							|  |  |  |   int nagain;                       //1 ==> decode only at fQSO +/- Tol
 | 
					
						
							|  |  |  |   int ndepth;                       //How much hinted decoding to do?
 | 
					
						
							| 
									
										
										
										
											2022-12-11 08:35:28 -05:00
										 |  |  |   int ndiskdat;                     //1 ==> data read from *.iq file
 | 
					
						
							| 
									
										
										
										
											2024-01-01 09:46:09 -05:00
										 |  |  |   int ntx60;                        //Number of seconds transmitted in Q65-60x
 | 
					
						
							| 
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 |  |  |   int newdat;                       //1 ==> new data, must do long FFT
 | 
					
						
							|  |  |  |   int nfa;                          //Low decode limit (kHz)
 | 
					
						
							|  |  |  |   int nfb;                          //High decode limit (kHz)
 | 
					
						
							|  |  |  |   int nfcal;                        //Frequency correction, for calibration (Hz)
 | 
					
						
							|  |  |  |   int nfshift;                      //Shift of displayed center freq (kHz)
 | 
					
						
							| 
									
										
										
										
											2024-01-01 09:46:09 -05:00
										 |  |  |   int ntx30a;                       //Number of seconds transmitted in first half minute , Q65-30x
 | 
					
						
							|  |  |  |   int ntx30b;                       //Number of seconds transmitted in second half minute, Q65-30x
 | 
					
						
							| 
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 |  |  |   int ntol;                         //+/- decoding range around fQSO (Hz)
 | 
					
						
							| 
									
										
										
										
											2024-01-15 13:10:41 -05:00
										 |  |  |   int n60;                          //nsecs%60
 | 
					
						
							| 
									
										
										
										
											2024-01-03 13:51:37 -05:00
										 |  |  |   int junk4;                        //
 | 
					
						
							| 
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 |  |  |   int nfsample;                     //Input sample rate
 | 
					
						
							| 
									
										
										
										
											2024-01-15 15:47:57 -05:00
										 |  |  |   int ndop58;                       //EME Self Doppler at t=58
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:25:07 -05:00
										 |  |  |   int nBaseSubmode;                 //Base submode for Q65-60x (aka m_modeQ65)
 | 
					
						
							| 
									
										
										
										
											2024-01-15 15:47:57 -05:00
										 |  |  |   int ndop00;                       //EME Self Doppler at t=0
 | 
					
						
							| 
									
										
										
										
											2024-01-15 13:10:41 -05:00
										 |  |  |   int nsave;                        //0=None, 1=SaveDecoded, 2=SaveAll
 | 
					
						
							| 
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 |  |  |   int max_drift;                    //Maximum Q65 drift: units symbol_rate/TxT
 | 
					
						
							| 
									
										
										
										
											2023-08-29 13:17:20 +02:00
										 |  |  |   int offset;                       //Offset in Hz
 | 
					
						
							| 
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 |  |  |   int nhsym;                        //Number of available JT65 half-symbols
 | 
					
						
							|  |  |  |   char mycall[12]; | 
					
						
							|  |  |  |   char mygrid[6]; | 
					
						
							|  |  |  |   char hiscall[12]; | 
					
						
							|  |  |  |   char hisgrid[6]; | 
					
						
							|  |  |  |   char datetime[20]; | 
					
						
							|  |  |  |   int junk1;                        //Used to test extent of copy to shared memory
 | 
					
						
							|  |  |  |   int junk2; | 
					
						
							| 
									
										
										
										
											2023-12-14 13:37:28 -05:00
										 |  |  |   bool bAlso30;                     //Process for 30-second submode as well as 60-second
 | 
					
						
							| 
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 |  |  | } datcom_; | 
					
						
							| 
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | extern struct {                     //This is "common/datcom/..." in Fortran
 | 
					
						
							| 
									
										
										
										
											2022-12-12 18:52:45 -05:00
										 |  |  |   float d4[2*5760000];              //Raw I/Q data from Linrad
 | 
					
						
							| 
									
										
										
										
											2023-12-07 11:43:25 -05:00
										 |  |  |   float ss[400*NFFT];               //Half-symbol spectra at 0,45,90,135 deg pol
 | 
					
						
							| 
									
										
										
										
											2022-12-12 13:56:10 -05:00
										 |  |  |   float savg[NFFT];                 //Avg spectra at 0,45,90,135 deg pol
 | 
					
						
							| 
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 |  |  |   double fcenter;                   //Center freq from Linrad (MHz)
 | 
					
						
							|  |  |  |   int nutc;                         //UTC as integer, HHMM
 | 
					
						
							| 
									
										
										
										
											2023-01-16 17:45:14 -05:00
										 |  |  |   float fselected;                  //Selected frequency for nagain decodes
 | 
					
						
							| 
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 |  |  |   int mousedf;                      //User-selected DF
 | 
					
						
							|  |  |  |   int mousefqso;                    //User-selected QSO freq (kHz)
 | 
					
						
							|  |  |  |   int nagain;                       //1 ==> decode only at fQSO +/- Tol
 | 
					
						
							|  |  |  |   int ndepth;                       //How much hinted decoding to do?
 | 
					
						
							| 
									
										
										
										
											2022-12-11 08:35:28 -05:00
										 |  |  |   int ndiskdat;                     //1 ==> data read from *.iq file
 | 
					
						
							| 
									
										
										
										
											2024-01-01 09:46:09 -05:00
										 |  |  |   int ntx60;                        //Number of seconds transmitted in Q65-60x
 | 
					
						
							| 
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 |  |  |   int newdat;                       //1 ==> new data, must do long FFT
 | 
					
						
							|  |  |  |   int nfa;                          //Low decode limit (kHz)
 | 
					
						
							|  |  |  |   int nfb;                          //High decode limit (kHz)
 | 
					
						
							|  |  |  |   int nfcal;                        //Frequency correction, for calibration (Hz)
 | 
					
						
							|  |  |  |   int nfshift;                      //Shift of displayed center freq (kHz)
 | 
					
						
							| 
									
										
										
										
											2024-01-01 09:46:09 -05:00
										 |  |  |   int ntx30a;                       //Number of seconds transmitted in first half minute , Q65-30x
 | 
					
						
							|  |  |  |   int ntx30b;                       //Number of seconds transmitted in second half minute, Q65-30x
 | 
					
						
							| 
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 |  |  |   int ntol;                         //+/- decoding range around fQSO (Hz)
 | 
					
						
							| 
									
										
										
										
											2024-01-15 13:10:41 -05:00
										 |  |  |   int n60;                          //nsecs%60
 | 
					
						
							| 
									
										
										
										
											2024-01-03 13:51:37 -05:00
										 |  |  |   int junk4;                        //
 | 
					
						
							| 
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 |  |  |   int nfsample;                     //Input sample rate
 | 
					
						
							| 
									
										
										
										
											2024-01-15 15:47:57 -05:00
										 |  |  |   int ndop58;                       //EME Self Doppler at t=58
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:25:07 -05:00
										 |  |  |   int nBaseSubmode;                 //Base submode for Q65-60x (aka m_modeQ65)
 | 
					
						
							| 
									
										
										
										
											2024-01-15 15:47:57 -05:00
										 |  |  |   int ndop00;                       //EME Self Doppler at t=0
 | 
					
						
							| 
									
										
										
										
											2024-01-15 13:10:41 -05:00
										 |  |  |   int nsave;                        //0=None, 1=SaveDecoded, 2=SaveAll
 | 
					
						
							| 
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 |  |  |   int max_drift;                    //Maximum Q65 drift: units symbol_rate/TxT
 | 
					
						
							| 
									
										
										
										
											2023-08-29 13:17:20 +02:00
										 |  |  |   int offset;                       //Offset in Hz
 | 
					
						
							| 
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 |  |  |   int nhsym;                        //Number of available JT65 half-symbols
 | 
					
						
							|  |  |  |   char mycall[12]; | 
					
						
							|  |  |  |   char mygrid[6]; | 
					
						
							|  |  |  |   char hiscall[12]; | 
					
						
							|  |  |  |   char hisgrid[6]; | 
					
						
							|  |  |  |   char datetime[20]; | 
					
						
							|  |  |  |   int junk1;                        //Used to test extent of copy to shared memory
 | 
					
						
							|  |  |  |   int junk2; | 
					
						
							| 
									
										
										
										
											2023-12-14 13:37:28 -05:00
										 |  |  |   bool bAlso30;                     //Process for 30-second submode as well as 60-second
 | 
					
						
							| 
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 |  |  | } datcom2_; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-10 10:52:58 -05:00
										 |  |  | extern struct { | 
					
						
							| 
									
										
										
										
											2023-01-26 10:55:10 -05:00
										 |  |  |   int ndecodes;          //These are flags for inter-process communication
 | 
					
						
							|  |  |  |   int ncand;             //between QMAP and WSJT-X
 | 
					
						
							|  |  |  |   int nQDecoderDone;     //1 for real-time decodes, 2 for data from disk
 | 
					
						
							|  |  |  |   int nWDecoderBusy;     //Set to 1 when WSJT-X decoder is busy
 | 
					
						
							| 
									
										
										
										
											2023-12-31 09:30:39 -05:00
										 |  |  |   int nWTransmitting;    //Set to TRperiod when WSJT-X is transmitting
 | 
					
						
							| 
									
										
										
										
											2024-01-25 14:27:54 -05:00
										 |  |  |   int kHzRequested;      //Integer kHz dial frequency request to WSJT-X
 | 
					
						
							| 
									
										
										
										
											2024-01-18 16:25:08 -05:00
										 |  |  |   char result[50][64];   //Staging area for QMAP decodes
 | 
					
						
							| 
									
										
										
										
											2022-12-10 10:52:58 -05:00
										 |  |  | } decodes_; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-15 19:24:26 -05:00
										 |  |  | extern struct { | 
					
						
							|  |  |  |   char revision[22]; | 
					
						
							|  |  |  |   char saveFileName[120]; | 
					
						
							|  |  |  | } savecom_; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // COMMONS_H
 |