1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
#ifndef COMMONS_H
#define COMMONS_H
#define NSMAX 6827
#define NTMAX 120
#define RX_SAMPLE_RATE 12000
#ifdef __cplusplus
#include <cstdbool>
//extern "C" {
#else
#include <stdbool.h>
#endif
/*
* This structure is shared with Fortran code, it MUST be kept in
* sync with lib/jt9com.f90
* int nutc; //UTC as integer, HHMM
* int ntrperiod; //TR period (seconds)
* int nfqso; //User-selected QSO freq (kHz)
* 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)
* bool ndiskdat; //true ==> data read from *.wav file
* bool newdat; //true ==> new data, must do long FFT
*/
typedef struct dec_data {
float ss[184*NSMAX];
float savg[NSMAX];
short int d2[NTMAX*RX_SAMPLE_RATE];
float dd2[NTMAX*RX_SAMPLE_RATE];
struct
{
// char datetime[20];
char mycall[12];
char mybcall[12];
char hiscall[12];
char hisbcall[12];
// char mygrid[6];
char hisgrid[6];
int listutc[10];
int napwid;
int nQSOProgress;
int nftx;
int nutc;
int ntrperiod;
int nfqso;
int npts8;
int nfa;
int nfSplit;
int nfb;
int ntol;
int kin;
int nzhsym;
int ndepth;
int ncandthin;
int ndtcenter;
int nft8cycles;
int nft8swlcycles;
int ntxmode;
int nmode;
int nlist;
int nranera;
int ntrials10;
int ntrialsrxf10;
int naggressive;
int nharmonicsdepth;
int ntopfreq65;
int nprepass;
int nsdecatt;
int nlasttx;
int ndelay;
int nmt;
int nft8rxfsens;
int nft4depth;
int nsecbandchanged;
bool ndiskdat;
bool newdat;
bool nagain;
bool nagainfil;
bool nswl;
bool nfilter;
bool nstophint;
bool nagcc;
bool nhint;
bool fmaskact;
bool showharmonics;
bool lft8lowth;
bool lft8subpass;
bool ltxing;
bool lhidetest;
bool lhidetelemetry;
bool lhideft8dupes;
bool lhound;
bool lhidehash;
bool lcommonft8b;
bool lmycallstd;
bool lhiscallstd;
bool lapmyc;
bool lmodechanged;
bool lbandchanged;
bool lenabledxcsearch;
bool lwidedxcsearch;
bool lmultinst;
bool lskiptx1;
bool lforcesync;
bool learlystart;
} params;
} dec_data_t;
// for unknown reason values of the variables at beginning of dec_data list are being
// not updated while Decode button is pushed manually, for decoding again keep variables at end
// of the list
#ifdef __cplusplus
extern "C" {
#endif
extern struct {
float wave[606720];
} foxcom_;
#define NUM_JT65_SYMBOLS 126 //63 data + 63 sync
#define NUM_JT9_SYMBOLS 85 //69 data + 16 sync
#define NUM_T10_SYMBOLS 85 //69 data + 16 sync
#define NUM_WSPR_SYMBOLS 162 //(50+31)*2, embedded sync
#define NUM_FT8_SYMBOLS 79
#define NUM_FT4_SYMBOLS 105
#define NUM_CW_SYMBOLS 250
#define TX_SAMPLE_RATE 48000
extern int volatile itone[NUM_WSPR_SYMBOLS]; //Audio tones for all Tx symbols
extern int volatile icw[NUM_CW_SYMBOLS]; //Dits for CW ID
#ifdef __cplusplus
}
#endif
#endif // COMMONS_H
|