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
|
double PreComp = atof(argv[++argi]);
double InlComp = atof(argv[++argi]);
double PosComp = atof(argv[++argi]);
double Gain1 = 0;
double Gain2 = 0;
double Gain3 = 0;
double Gain4 = 0;
double Gain5 = 0;
double Gain6 = 0;
double Gain7 = 0;
double Gain8 = 0;
double Gain9 = 0;
double Gain_PreComp = 0.65*PreComp;
if (Gain_PreComp > 50){
Gain1 = 25, Gain2 = 25, Gain3 = Gain_PreComp - 50;
else {if (25 < Gain_PreComp <= 50)
Gain1 = 25, Gain2 = Gain_PreComp - 25, Gain3 = 0;
else {if (Gain_PreComp <= 25)
Gain1 = Gain_PreComp, Gain2 = 0, Gain3 = 0;
}}}
double Gain_InlComp = 0.65*InlComp;
if (Gain_InlComp > 50){
Gain4 = 25, Gain5 = 25, Gain6 = Gain_InlComp - 50;
else {if (25 < Gain_InlComp <= 50)
Gain4 = 25, Gain5 = Gain_InlComp - 25, Gain6 = 0;
else {if
(Gain_InlComp <= 25)
Gain4 = Gain_InlComp;
Gain5 = 0;
Gain6 = 0;
}}}
double Gain_PosComp = 0.65*PosComp;
if (Gain_PosComp > 50){
Gain7 = 25, Gain8 = 25, Gain9 = Gain_PosComp - 50;
else {if (25 < Gain_PosComp <= 50)
Gain7 = 25, Gain8 = Gain_PosComp - 25, Gain9 = 0;
else {if (Gain_PosComp <= 25)
Gain7 = Gain_PosComp, Gain8 = 0, Gain9 = 0;
}}}
|