for (int i=0; i<360; i++) { Dcdisk=0; Beta = i; while(Dcdisk <= Dpv && flag!=1) { if( Beta <= 180 ) { Omega = Beta; } if( Beta > 180 ) { Omega = 360 - Beta; } qDebug()<<"i="<<i <<"Omega="<< Omega <<"Beta="<<Beta; Dcnakl = sqrt( pow(Dcdisk,2) + pow(Hsvn,2) ); Dp = sqrt( pow(Dcdisk,2) + pow(Rb,2) - 2*Rb*Dcdisk*cos(Omega*M_PI/180) ); Dpnakl = sqrt( pow(Dp,2) + pow(Hsvn,2) ); ae = 90 - ( 180*acos(Hsvn/Dcnakl) )/M_PI - ( 180*atan(Hsvn/Dp) )/M_PI; ab = ( 180*asin( Rb*sin(Omega*M_PI/180)/Dp ) )/M_PI; if(ab <= Tbeta) { gb = exp( (-1)*Kapr*(pow(ab,2)/pow(Tbeta,2)) ); } else { gb = ( pow(Tbeta,2) * exp((-1)*Kapr) ) / ( pow(ab,2) ); } if(ae <= Tebs) { ge = exp( (-1)*Kapr*(pow(ae,2)/pow(Tebs,2)) ); } else { ge = ( pow(Tebs, 2) * exp((-1)*Kapr) ) / ( pow(ae,2) ); } gbe = gb*ge; OtnP = ( pow(Dcnakl,4) * 4 * M_PI * Pp * Gp * fpr * gbe )/( Ksj * M * sqrt(N) * Pl * Gl * pow(Dpnakl,2) * Fp * Sig); if(OtnP >= Kp) { Dc = Dcdisk; flag = 1; } else { Dcdisk = Dcdisk + 10; } } if (flag != 1) { Dc = Dpv; } if ((Dc-Rbz)>=0) { A[i] = 0; } else { A[i] = 1; } }
C++ (Qt)while(Dcdisk <= Dpv && flag!=1)