![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Fertig
Fork of RT2_P3_students by
GPA.h@8:8ed679044a72, 2018-04-17 (annotated)
- Committer:
- altb
- Date:
- Tue Apr 17 11:47:35 2018 +0000
- Revision:
- 8:8ed679044a72
- Parent:
- 7:72982ede2ff6
RT2_P3_W2, 2nd session
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
altb | 7:72982ede2ff6 | 1 | #ifndef GPA_H_ |
altb | 7:72982ede2ff6 | 2 | #define GPA_H_ |
altb | 7:72982ede2ff6 | 3 | |
altb | 7:72982ede2ff6 | 4 | |
altb | 0:78ca29b4c49e | 5 | class GPA |
altb | 0:78ca29b4c49e | 6 | { |
altb | 0:78ca29b4c49e | 7 | public: |
altb | 0:78ca29b4c49e | 8 | |
altb | 0:78ca29b4c49e | 9 | GPA(float fMin, float fMax, int NfexcDes, int NperMin, int NmeasMin, float Ts, float Aexc0, float Aexc1); |
altb | 6:2cc56521aa16 | 10 | GPA(float f0, float f1, float *fexcDes, int NperMin, int NmeasMin, float Ts, float Aexc0, float Aexc1); |
altb | 6:2cc56521aa16 | 11 | GPA(float *fexcDes, int NperMin, int NmeasMin, float Ts, float Aexc0, float Aexc1); |
altb | 0:78ca29b4c49e | 12 | |
altb | 0:78ca29b4c49e | 13 | float operator()(float inp, float out) { |
altb | 6:2cc56521aa16 | 14 | return update((double)inp, (double)out); |
altb | 0:78ca29b4c49e | 15 | } |
altb | 0:78ca29b4c49e | 16 | |
altb | 0:78ca29b4c49e | 17 | virtual ~GPA(); |
altb | 0:78ca29b4c49e | 18 | |
altb | 0:78ca29b4c49e | 19 | void reset(); |
altb | 6:2cc56521aa16 | 20 | float update(double inp, double out); |
altb | 0:78ca29b4c49e | 21 | |
altb | 0:78ca29b4c49e | 22 | void printGPAfexcDes(); |
altb | 0:78ca29b4c49e | 23 | void printGPAmeasPara(); |
altb | 0:78ca29b4c49e | 24 | void printGPAmeasTime(); |
altb | 0:78ca29b4c49e | 25 | |
altb | 0:78ca29b4c49e | 26 | private: |
altb | 0:78ca29b4c49e | 27 | |
altb | 0:78ca29b4c49e | 28 | int NfexcDes; |
altb | 0:78ca29b4c49e | 29 | int NperMin; |
altb | 0:78ca29b4c49e | 30 | int NmeasMin; |
altb | 6:2cc56521aa16 | 31 | double Ts; |
altb | 6:2cc56521aa16 | 32 | double *fexcDes; |
altb | 6:2cc56521aa16 | 33 | double aAexcDes; |
altb | 6:2cc56521aa16 | 34 | double bAexcDes; |
altb | 0:78ca29b4c49e | 35 | |
altb | 6:2cc56521aa16 | 36 | double fnyq; |
altb | 6:2cc56521aa16 | 37 | double pi2; |
altb | 6:2cc56521aa16 | 38 | double pi2Ts; |
altb | 6:2cc56521aa16 | 39 | double piDiv2; |
altb | 0:78ca29b4c49e | 40 | |
altb | 0:78ca29b4c49e | 41 | int Nmeas; |
altb | 0:78ca29b4c49e | 42 | int Nper; |
altb | 6:2cc56521aa16 | 43 | double fexc; |
altb | 6:2cc56521aa16 | 44 | double fexcPast; |
altb | 0:78ca29b4c49e | 45 | int ii; |
altb | 0:78ca29b4c49e | 46 | int jj; |
altb | 6:2cc56521aa16 | 47 | double scaleG; |
altb | 6:2cc56521aa16 | 48 | double cr; |
altb | 6:2cc56521aa16 | 49 | double ci; |
altb | 6:2cc56521aa16 | 50 | double *sU; |
altb | 6:2cc56521aa16 | 51 | double *sY; |
altb | 6:2cc56521aa16 | 52 | double sinarg; |
altb | 0:78ca29b4c49e | 53 | int NmeasTotal; |
altb | 6:2cc56521aa16 | 54 | double Aexc; |
altb | 6:2cc56521aa16 | 55 | double pi2Tsfexc; |
altb | 0:78ca29b4c49e | 56 | |
altb | 6:2cc56521aa16 | 57 | void fexcDesLogspace(double fMin, double fMax, int NfexcDes); |
altb | 6:2cc56521aa16 | 58 | void calcGPAmeasPara(double fexcDes_i); |
altb | 0:78ca29b4c49e | 59 | void printLine(); |
altb | 0:78ca29b4c49e | 60 | |
altb | 8:8ed679044a72 | 61 | }; |
altb | 8:8ed679044a72 | 62 | |
altb | 8:8ed679044a72 | 63 | |
altb | 8:8ed679044a72 | 64 | #endif /* GPA_H_ */ |