wnorth=whead*cos(psi) + wcross*cos(psi+M_PI/2);
weast=whead*sin(psi) + wcross*sin(psi+M_PI/2);
break;
+ case setwned:
+ break;
}
uw=wnorth*ctheta*cpsi +
weast*ctheta*spsi -
//******************************************************************************
double FGInitialCondition::GammaEqOfTheta(double Theta) {
- double a,b,c,d;
+ double a,b,c;
double sTheta,cTheta;
//theta=Theta; stheta=sin(theta); ctheta=cos(theta);
//******************************************************************************
double FGInitialCondition::GammaEqOfAlpha(double Alpha) {
- double a,b,c,d;
+ double a,b,c;
double sAlpha,cAlpha;
sAlpha=sin(Alpha); cAlpha=cos(Alpha);
//initializations
d=1;
-
+ x2 = 0;
x1=xlo;x3=xhi;
f1=(this->*sfunc)(x1)-x;
f3=(this->*sfunc)(x3)-x;
i=0;
while ((fabs(d) > eps) && (i < 100)) {
d=(x3-x1)/d0;
- x2=x1-d*d0*f1/(f3-f1);
-
+ x2 = x1-d*d0*f1/(f3-f1);
+
f2=(this->*sfunc)(x2)-x;
//cout << "solve x1,x2,x3: " << x1 << "," << x2 << "," << x3 << endl;
//cout << " " << f1 << "," << f2 << "," << f3 << endl;
# endif
FGConfigFile resetfile(resetDef);
- if (!resetfile.IsOpen()) return false;
+ if (!resetfile.IsOpen()) {
+ cerr << "Failed to open reset file: " << resetDef << endl;
+ return false;
+ }
resetfile.GetNextConfigLine();
token = resetfile.GetValue();