Library for control puposes

Dependents:  

Fork of Cntrl_Lib by Ruprecht Altenburger

Committer:
pmic
Date:
Mon Jan 07 13:31:38 2019 +0000
Revision:
7:7715f92c5182
Parent:
5:d00752fcad65
Child:
12:c8ec698c53ed
update gpa

Who changed what in which revision?

UserRevisionLine numberNew contents of line
altb 0:e2a7d7f91e49 1 class GPA
altb 0:e2a7d7f91e49 2 {
altb 0:e2a7d7f91e49 3 public:
altb 0:e2a7d7f91e49 4
pmic 7:7715f92c5182 5 GPA(float fMin, float fMax, int NfexcDes, int NperMin, int NmeasMin, float Ts, float Aexc0, float Aexc1, int NstartMin, int NsweepMin);
pmic 7:7715f92c5182 6 GPA(float f0, float f1, float *fexcDes, int NfexcDes, int NperMin, int NmeasMin, float Ts, float Aexc0, float Aexc1, int NstartMin, int NsweepMin);
pmic 7:7715f92c5182 7 GPA(float *fexcDes, int NfexcDes, int NperMin, int NmeasMin, float Ts, float Aexc0, float Aexc1, int NstartMin, int NsweepMin);
altb 0:e2a7d7f91e49 8
altb 0:e2a7d7f91e49 9 float operator()(float inp, float out) {
altb 0:e2a7d7f91e49 10 return update((double)inp, (double)out);
altb 0:e2a7d7f91e49 11 }
altb 0:e2a7d7f91e49 12
altb 0:e2a7d7f91e49 13 virtual ~GPA();
altb 0:e2a7d7f91e49 14
altb 0:e2a7d7f91e49 15 void reset();
altb 0:e2a7d7f91e49 16 float update(double inp, double out);
altb 0:e2a7d7f91e49 17
altb 0:e2a7d7f91e49 18 void printGPAfexcDes();
altb 0:e2a7d7f91e49 19 void printGPAmeasPara();
pmic 7:7715f92c5182 20 void printFullGPAmeasPara();
altb 0:e2a7d7f91e49 21 void printGPAmeasTime();
altb 0:e2a7d7f91e49 22 void printNfexcDes();
altb 0:e2a7d7f91e49 23
altb 0:e2a7d7f91e49 24 private:
altb 0:e2a7d7f91e49 25
altb 0:e2a7d7f91e49 26 int NfexcDes;
altb 0:e2a7d7f91e49 27 int NperMin;
altb 0:e2a7d7f91e49 28 int NmeasMin;
altb 0:e2a7d7f91e49 29 double Ts;
altb 0:e2a7d7f91e49 30 double *fexcDes;
altb 0:e2a7d7f91e49 31 double aAexcDes;
altb 0:e2a7d7f91e49 32 double bAexcDes;
altb 0:e2a7d7f91e49 33
altb 0:e2a7d7f91e49 34 double fnyq;
altb 0:e2a7d7f91e49 35 double pi2;
altb 0:e2a7d7f91e49 36 double pi2Ts;
altb 0:e2a7d7f91e49 37 double piDiv2;
pmic 7:7715f92c5182 38 float rad2deg;
altb 0:e2a7d7f91e49 39
altb 0:e2a7d7f91e49 40 int Nmeas;
altb 0:e2a7d7f91e49 41 int Nper;
pmic 7:7715f92c5182 42 double dfexc;
altb 0:e2a7d7f91e49 43 double fexc;
altb 0:e2a7d7f91e49 44 double fexcPast;
pmic 7:7715f92c5182 45 int i;
pmic 7:7715f92c5182 46 int j;
altb 0:e2a7d7f91e49 47 double scaleG;
altb 0:e2a7d7f91e49 48 double cr;
altb 0:e2a7d7f91e49 49 double ci;
altb 0:e2a7d7f91e49 50 double *sU;
altb 0:e2a7d7f91e49 51 double *sY;
altb 0:e2a7d7f91e49 52 double sinarg;
altb 0:e2a7d7f91e49 53 int NmeasTotal;
altb 0:e2a7d7f91e49 54 double Aexc;
pmic 7:7715f92c5182 55 double AexcPast;
altb 0:e2a7d7f91e49 56 double pi2Tsfexc;
pmic 7:7715f92c5182 57 int NstartMin;
pmic 7:7715f92c5182 58 int NsweepMin;
pmic 7:7715f92c5182 59 int Nsweep;
pmic 7:7715f92c5182 60 double bfexc;
pmic 7:7715f92c5182 61 double afexc;
pmic 7:7715f92c5182 62 double aAexc;
pmic 7:7715f92c5182 63 double bAexc;
pmic 7:7715f92c5182 64 double AexcOut;
pmic 7:7715f92c5182 65
pmic 7:7715f92c5182 66 void assignParameters(int NfexcDes, int NperMin, int NmeasMin, double Ts, int NstartMin, int NsweepMin);
pmic 7:7715f92c5182 67 void calculateDecreasingAmplitudeCoefficients(double Aexc0, double Aexc1);
pmic 7:7715f92c5182 68 void initializeConstants(double Ts);
pmic 7:7715f92c5182 69 void assignFilterStorage();
altb 0:e2a7d7f91e49 70 void fexcDesLogspace(double fMin, double fMax, int NfexcDes);
altb 0:e2a7d7f91e49 71 void calcGPAmeasPara(double fexcDes_i);
pmic 7:7715f92c5182 72 void calcGPAsweepPara();
pmic 7:7715f92c5182 73 double wrapAngle(double angle);
pmic 7:7715f92c5182 74 void printLongLine();
altb 0:e2a7d7f91e49 75 void printLine();
altb 0:e2a7d7f91e49 76
altb 0:e2a7d7f91e49 77 };