/******************************************************************************/
bool FGTrimLong::DoTrim(void) {
- int k=0,j=0,sum=0,trim_failed=0,jmax=Naxis;
+ int k=0;
int its;
- float step,temp,min,max;
+
if(fgic->GetVtrueKtsIC() < 1) {
cout << "Trim failed, on-ground trimming not yet implemented." << endl;
return false;
}
- trimfp fp;
fgic -> SetAlphaDegIC((alphaMin+alphaMax)/2);
fdmex -> GetFCS() -> SetDeCmd(0);
total_its=k;
k=Ncycles; //force the trim to fail
}
-
-
-
- }
+ }
if( udot > Tolerance ) {
if(checkLimits(udotf,dth,0,1) == false) {
cout << " Sorry, udot doesn't appear to be trimmable" << endl;
cout << " Resetting throttles to zero" << endl;
+ setThrottlesPct(0);
fdmex->GetFCS()->SetThrottleCmd(-1,0);
+ fdmex->RunIC(fgic);
total_its=k;
k=Ncycles; //force the trim to fail
}
-
-
-
- }
+ }
if(qdot > A_Tolerance) {
if(checkLimits(qdotf,fdmex->GetFCS()->GetPitchTrimCmd(),-1,1) == false) {
total_its=k;
k=Ncycles; //force the trim to fail
}
-
-
-
}
}
k++;