~ubuntu-branches/ubuntu/trusty/fldigi/trusty

« back to all changes in this revision

Viewing changes to src/include/psk.h

  • Committer: Bazaar Package Importer
  • Author(s): Joop Stakenborg
  • Date: 2008-11-17 19:40:43 UTC
  • mfrom: (1.1.6 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081117194043-sfe108e41ppsyhxr
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
#define SNTHRESHOLD 6.0
40
40
#define AFCDECAYSLOW 8
 
41
 
 
42
#define NUM_FILTERS 3
 
43
#define GOERTZEL 288            //96 x 2 must be an integer value
 
44
 
41
45
//=====================================================================
42
46
 
43
47
class psk : public modem {
54
58
        C_FIR_filter    *fir1;
55
59
        C_FIR_filter    *fir2;
56
60
//      C_FIR_filter    *fir3;
57
 
        double          *fir1c;
58
 
        double          *fir2c;
 
61
        double                  *fir1c;
 
62
        double                  *fir2c;
 
63
        Cmovavg                 *snfilt;
 
64
        Cmovavg                 *imdfilt;
 
65
 
 
66
        double                  I1[NUM_FILTERS];
 
67
        double                  I2[NUM_FILTERS];
 
68
        double                  Q1[NUM_FILTERS];
 
69
        double                  Q2[NUM_FILTERS];
 
70
        double                  COEF[NUM_FILTERS];
 
71
        double                  m_Energy[NUM_FILTERS];
 
72
        int                             m_NCount;
 
73
        bool                    imdValid;
59
74
 
60
75
        encoder                 *enc;
61
76
        viterbi                 *dec;
81
96
        double                  I11, I12, I21, I22, I31, I32;
82
97
        double                  snratio, s2n, imdratio, imd;
83
98
        double                  E1, E2, E3;
84
 
        double                  twopi;
 
99
        double                  afcmetric;
85
100
        
86
101
//      complex thirdorder;
87
102
// tx variables & functions
97
112
        void                    phaseafc();
98
113
        void                    afc();
99
114
        void                    coreafc();
 
115
 
 
116
        void                    initSN_IMD();
 
117
        void                    resetSN_IMD();
 
118
        void                    calcSN_IMD(complex z);
100
119
        
101
120
public:
102
121
        psk(trx_mode mode);