+ cur_fdm_state->_set_Accels_Pilot_Body( net->A_X_pilot,
+ net->A_Y_pilot,
+ net->A_Z_pilot );
+
+ for ( i = 0; i < net->num_engines; ++i ) {
+ SGPropertyNode *node = fgGetNode( "engines/engine", i, true );
+
+ // node->setBoolValue("running", t->isRunning());
+ // node->setBoolValue("cranking", t->isCranking());
+
+ // cout << net->eng_state[i] << endl;
+ if ( net->eng_state[i] == 0 ) {
+ node->setBoolValue( "cranking", false );
+ node->setBoolValue( "running", false );
+ } else if ( net->eng_state[i] == 1 ) {
+ node->setBoolValue( "cranking", true );
+ node->setBoolValue( "running", false );
+ } else if ( net->eng_state[i] == 2 ) {
+ node->setBoolValue( "cranking", false );
+ node->setBoolValue( "running", true );
+ }
+
+ node->setDoubleValue( "rpm", net->rpm[i] );
+ node->setDoubleValue( "fuel-flow-gph", net->fuel_flow[i] );
+ node->setDoubleValue( "egt-degf", net->EGT[i] );
+ node->setDoubleValue( "oil-temperature-degf", net->oil_temp[i] );
+ node->setDoubleValue( "oil-pressure-psi", net->oil_px[i] );
+ }
+
+ for (i = 0; i < net->num_tanks; ++i ) {
+ SGPropertyNode * node
+ = fgGetNode("/consumables/fuel/tank", i, true);
+ node->setDoubleValue("level-gal_us", net->fuel_quantity[i] );
+ }
+
+ for (i = 0; i < net->num_wheels; ++i ) {
+ SGPropertyNode * node
+ = fgGetNode("/gear/gear", i, true);
+ node->setDoubleValue("wow", net->wow[i] );
+ }
+
+ fgSetDouble("/surface-positions/flap-pos-norm", net->flap_deflection);
+ SGPropertyNode * node = fgGetNode("/controls", true);
+ fgSetDouble("/surface-positions/elevator-pos-norm",
+ node->getDoubleValue( "elevator" ));
+ fgSetDouble("/surface-positions/rudder-pos-norm",
+ node->getDoubleValue( "rudder" ));
+ fgSetDouble("/surface-positions/left-aileron-pos-norm",
+ node->getDoubleValue( "aileron" ));
+ fgSetDouble("/surface-positions/right-aileron-pos-norm",
+ -node->getDoubleValue( "aileron" ));