2012-05-22 13:09:48 -04:00
|
|
|
#ifndef COMMONS_H
|
|
|
|
#define COMMONS_H
|
|
|
|
|
2013-07-08 09:17:22 -04:00
|
|
|
#define NSMAX 6827
|
2017-04-28 12:49:09 -04:00
|
|
|
#define NTMAX 300
|
2013-08-05 09:57:55 -04:00
|
|
|
#define RX_SAMPLE_RATE 12000
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2015-12-17 15:29:55 -05:00
|
|
|
#ifdef __cplusplus
|
2015-12-29 18:52:55 -05:00
|
|
|
#include <cstdbool>
|
2015-12-17 15:29:55 -05:00
|
|
|
extern "C" {
|
2019-06-06 07:56:25 -04:00
|
|
|
#endif
|
|
|
|
#ifndef __cplusplus
|
2015-12-29 18:52:55 -05:00
|
|
|
#include <stdbool.h>
|
2015-12-17 15:29:55 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This structure is shared with Fortran code, it MUST be kept in
|
|
|
|
* sync with lib/jt9com.f90
|
|
|
|
*/
|
|
|
|
extern struct dec_data {
|
|
|
|
float ss[184*NSMAX];
|
2012-09-28 19:59:50 -04:00
|
|
|
float savg[NSMAX];
|
2016-07-06 10:18:23 -04:00
|
|
|
float sred[5760];
|
2013-08-05 09:57:55 -04:00
|
|
|
short int d2[NTMAX*RX_SAMPLE_RATE];
|
2015-12-17 15:29:55 -05:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
int nutc; //UTC as integer, HHMM
|
2015-12-29 18:52:55 -05:00
|
|
|
bool ndiskdat; //true ==> data read from *.wav file
|
2015-12-17 15:29:55 -05:00
|
|
|
int ntrperiod; //TR period (seconds)
|
2017-07-26 17:19:21 -04:00
|
|
|
int nQSOProgress; /* QSO state machine state */
|
2015-12-17 15:29:55 -05:00
|
|
|
int nfqso; //User-selected QSO freq (kHz)
|
2017-07-26 17:19:21 -04:00
|
|
|
int nftx; /* Transmit audio offset where
|
|
|
|
replies might be expected */
|
2015-12-29 18:52:55 -05:00
|
|
|
bool newdat; //true ==> new data, must do long FFT
|
2015-12-17 15:29:55 -05:00
|
|
|
int npts8; //npts for c0() array
|
|
|
|
int nfa; //Low decode limit (Hz)
|
|
|
|
int nfSplit; //JT65 | JT9 split frequency
|
|
|
|
int nfb; //High decode limit (Hz)
|
|
|
|
int ntol; //+/- decoding range around fQSO (Hz)
|
|
|
|
int kin;
|
|
|
|
int nzhsym;
|
|
|
|
int nsubmode;
|
2015-12-29 18:52:55 -05:00
|
|
|
bool nagain;
|
2015-12-17 15:29:55 -05:00
|
|
|
int ndepth;
|
2017-11-04 13:03:56 -04:00
|
|
|
bool lft8apon;
|
2017-12-03 19:46:19 -05:00
|
|
|
bool lapcqonly;
|
2017-11-04 13:03:56 -04:00
|
|
|
bool ljt65apon;
|
2017-07-21 23:01:09 -04:00
|
|
|
int napwid;
|
2015-12-17 15:29:55 -05:00
|
|
|
int ntxmode;
|
|
|
|
int nmode;
|
|
|
|
int minw;
|
2016-04-06 13:11:19 -04:00
|
|
|
bool nclearave;
|
2015-12-17 15:29:55 -05:00
|
|
|
int minSync;
|
|
|
|
float emedelay;
|
|
|
|
float dttol;
|
|
|
|
int nlist;
|
|
|
|
int listutc[10];
|
|
|
|
int n2pass;
|
|
|
|
int nranera;
|
|
|
|
int naggressive;
|
2015-12-29 18:52:55 -05:00
|
|
|
bool nrobust;
|
2015-12-17 15:29:55 -05:00
|
|
|
int nexp_decode;
|
|
|
|
char datetime[20];
|
|
|
|
char mycall[12];
|
|
|
|
char mygrid[6];
|
|
|
|
char hiscall[12];
|
|
|
|
char hisgrid[6];
|
2020-01-08 09:41:47 -05:00
|
|
|
char cqstr[4];
|
2015-12-17 15:29:55 -05:00
|
|
|
} params;
|
|
|
|
} dec_data;
|
2012-09-25 12:04:38 -04:00
|
|
|
|
2014-03-05 13:20:40 -05:00
|
|
|
extern struct {
|
|
|
|
float syellow[NSMAX];
|
2016-04-09 10:51:20 -04:00
|
|
|
float ref[3457];
|
2016-04-11 16:53:54 -04:00
|
|
|
float filter[3457];
|
2016-04-09 10:51:20 -04:00
|
|
|
} spectra_;
|
2015-12-17 15:29:55 -05:00
|
|
|
|
2015-06-08 15:42:20 -04:00
|
|
|
extern struct {
|
|
|
|
int nclearave;
|
|
|
|
int nsum;
|
2015-06-09 12:15:35 -04:00
|
|
|
float blue[4096];
|
|
|
|
float red[4096];
|
2015-06-08 15:42:20 -04:00
|
|
|
} echocom_;
|
|
|
|
|
2017-11-21 15:06:58 -05:00
|
|
|
extern struct {
|
|
|
|
float wave[606720];
|
2017-12-04 13:58:38 -05:00
|
|
|
int nslots;
|
2017-12-27 16:06:57 -05:00
|
|
|
int nfreq;
|
2017-12-04 13:58:38 -05:00
|
|
|
int i3bit[5];
|
2017-12-21 15:55:38 -05:00
|
|
|
char cmsg[5][40];
|
2017-12-22 13:00:47 -05:00
|
|
|
char mycall[12];
|
2017-11-21 15:06:58 -05:00
|
|
|
} foxcom_;
|
|
|
|
|
2015-12-17 15:29:55 -05:00
|
|
|
#ifdef __cplusplus
|
2014-03-05 13:20:40 -05:00
|
|
|
}
|
2015-12-17 15:29:55 -05:00
|
|
|
#endif
|
2014-03-05 13:20:40 -05:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
#endif // COMMONS_H
|