FGJSBsim::FGJSBsim(void) {
bool result;
-
+
+ runcount=0;
+
fdmex=new FGFDMExec;
fgic=new FGInitialCondition(fdmex);
needTrim=true;
double save_alt = 0.0;
-
- // lets try to avoid really screwing up the JSBsim model
- if ( get_Altitude() < -9000 ) {
- save_alt = get_Altitude();
- set_Altitude( 0.0 );
- }
copy_to_JSBsim();
}
fgtrim->ReportState();
delete fgtrim;
-
- needTrim=false;
+
+
+ needTrim=false;
controls.set_elevator_trim(fdmex->GetFCS()->GetPitchTrimCmd());
// but lets restore our original bogus altitude when we are done
- if ( save_alt < -9000.0 ) {
- set_Altitude( save_alt );
- }
+
//climb rate now set from FDM in copy_from_x()
return true;