+ if (FCS->GetGearPos() < 0.01)
+ snprintf(gear,12,"Up");
+ else if (FCS->GetGearPos() > 0.99)
+ snprintf(gear,12,"Down");
+ else
+ snprintf(gear,12,"In Transit");
+
+ snprintf(out,80, " Flaps: %3s Gear: %12s\n",flap,gear);
+ cout << out;
+ snprintf(out,80, " Speed: %4.0f KCAS Mach: %5.2f\n",
+ FDMExec->GetAuxiliary()->GetVcalibratedKTS(),
+ Translation->GetMach() );
+ cout << out;
+ snprintf(out,80, " Altitude: %7.0f ft. AGL Altitude: %7.0f ft.\n",
+ Position->Geth(),
+ Position->GetDistanceAGL() );
+ cout << out;
+ snprintf(out,80, " Angle of Attack: %6.2f deg Pitch Angle: %6.2f deg\n",
+ Translation->Getalpha()*radtodeg,
+ Rotation->Gettht()*radtodeg );
+ cout << out;
+ snprintf(out,80, " Flight Path Angle: %6.2f deg Climb Rate: %5.0f ft/min\n",
+ Position->GetGamma()*radtodeg,
+ Position->Gethdot()*60 );
+ cout << out;
+ snprintf(out,80, " Normal Load Factor: %4.2f g's Pitch Rate: %5.2f deg/s\n",
+ Aircraft->GetNlf(),
+ Rotation->GetPQR(2)*radtodeg );
+ cout << out;
+ snprintf(out,80, " Heading: %3.0f deg true Sideslip: %5.2f deg Yaw Rate: %5.2f deg/s\n",
+ Rotation->Getpsi()*radtodeg,
+ Translation->Getbeta()*radtodeg,
+ Rotation->GetPQR(3)*radtodeg );
+ cout << out;
+ snprintf(out,80, " Bank Angle: %5.2f deg Roll Rate: %5.2f deg/s\n",
+ Rotation->Getphi()*radtodeg,
+ Rotation->GetPQR(1)*radtodeg );
+ cout << out;
+ snprintf(out,80, " Elevator: %5.2f deg Left Aileron: %5.2f deg Rudder: %5.2f deg\n",
+ FCS->GetDePos(ofRad)*radtodeg,
+ FCS->GetDaLPos(ofRad)*radtodeg,
+ FCS->GetDrPos(ofRad)*radtodeg );
+ cout << out;
+ snprintf(out,80, " Throttle: %5.2f%c\n",
+ FCS->GetThrottlePos(0)*100,'%' );
+ cout << out;
+
+ snprintf(out,80, " Wind Components: %5.2f kts head wind, %5.2f kts cross wind\n",
+ FDMExec->GetAuxiliary()->GetHeadWind()*fpstokts,
+ FDMExec->GetAuxiliary()->GetCrossWind()*fpstokts );
+ cout << out;
+
+ snprintf(out,80, " Ground Speed: %4.0f knots , Ground Track: %3.0f deg true\n",
+ Position->GetVground()*fpstokts,
+ Position->GetGroundTrack()*radtodeg );
+ cout << out;
+#endif
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGState::bind(void)
+{
+ PropertyManager->Tie("sim-time-sec",this,
+ &FGState::Getsim_time);
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGState::unbind(void)
+{
+ PropertyManager->Untie("sim-time-sec");
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+// The bitmasked value choices are as follows:
+// unset: In this case (the default) JSBSim would only print
+// out the normally expected messages, essentially echoing
+// the config files as they are read. If the environment
+// variable is not set, debug_lvl is set to 1 internally
+// 0: This requests JSBSim not to output any messages
+// whatsoever.
+// 1: This value explicity requests the normal JSBSim
+// startup messages
+// 2: This value asks for a message to be printed out when
+// a class is instantiated
+// 4: When this value is set, a message is displayed when a
+// FGModel object executes its Run() method
+// 8: When this value is set, various runtime state variables
+// are printed out periodically
+// 16: When set various parameters are sanity checked and
+// a message is printed out when they go out of bounds
+
+void FGState::Debug(int from)
+{
+ if (debug_lvl <= 0) return;
+
+ if (debug_lvl & 1) { // Standard console startup message output
+ if (from == 0) { // Constructor
+
+ }
+ }
+ if (debug_lvl & 2 ) { // Instantiation/Destruction notification
+ if (from == 0) cout << "Instantiated: FGState" << endl;
+ if (from == 1) cout << "Destroyed: FGState" << endl;
+ }
+ if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
+ }
+ if (debug_lvl & 8 ) { // Runtime state variables
+ }
+ if (debug_lvl & 16) { // Sanity checking
+ }
+ if (debug_lvl & 64) {
+ if (from == 0) { // Constructor
+ cout << IdSrc << endl;
+ cout << IdHdr << endl;
+ }
+ }
+}
+}