for ( i = 0; i < net->num_engines; ++i ) {
SGPropertyNode *node = fgGetNode("engines/engine", i, true);
if ( node->getBoolValue( "running" ) ) {
- net->eng_state[0] = 2;
+ net->eng_state[i] = 2;
} else if ( node->getBoolValue( "cranking" ) ) {
- net->eng_state[0] = 1;
+ net->eng_state[i] = 1;
} else {
- net->eng_state[0] = 0;
+ net->eng_state[i] = 0;
}
net->rpm[i] = node->getDoubleValue( "rpm" );
net->fuel_flow[i] = node->getDoubleValue( "fuel-flow-gph" );
- net->EGT[i] = node->getDoubleValue( "egt-degf" );
+ net->egt[i] = node->getDoubleValue( "egt-degf" );
// cout << "egt = " << aero->EGT << endl;
+ net->mp_osi[i] = node->getDoubleValue( "mp-osi" );
net->oil_temp[i] = node->getDoubleValue( "oil-temperature-degf" );
net->oil_px[i] = node->getDoubleValue( "oil-pressure-psi" );
}
// Control surface positions
SGPropertyNode *node = fgGetNode("/surface-positions", true);
net->elevator = node->getDoubleValue( "elevator-pos-norm" );
+ net->elevator_trim_tab
+ = node->getDoubleValue( "elevator-trim-tab-pos-norm" );
net->flaps = node->getDoubleValue( "flap-pos-norm" );
net->left_aileron = node->getDoubleValue( "left-aileron-pos-norm" );
net->right_aileron = node->getDoubleValue( "right-aileron-pos-norm" );
net->eng_state[i] = htonl(net->eng_state[i]);
htonf(net->rpm[i]);
htonf(net->fuel_flow[i]);
- htonf(net->EGT[i]);
+ htonf(net->egt[i]);
+ htonf(net->mp_osi[i]);
htonf(net->oil_temp[i]);
htonf(net->oil_px[i]);
}
htonf(net->visibility);
htonf(net->elevator);
+ htonf(net->elevator_trim_tab);
htonf(net->flaps);
htonf(net->left_aileron);
htonf(net->right_aileron);
net->eng_state[i] = htonl(net->eng_state[i]);
htonf(net->rpm[i]);
htonf(net->fuel_flow[i]);
- htonf(net->EGT[i]);
+ htonf(net->egt[i]);
+ htonf(net->mp_osi[i]);
htonf(net->oil_temp[i]);
htonf(net->oil_px[i]);
}
htonf(net->visibility);
htonf(net->elevator);
+ htonf(net->elevator_trim_tab);
htonf(net->flaps);
htonf(net->left_aileron);
htonf(net->right_aileron);
node->setDoubleValue( "rpm", net->rpm[i] );
node->setDoubleValue( "fuel-flow-gph", net->fuel_flow[i] );
- node->setDoubleValue( "egt-degf", net->EGT[i] );
+ node->setDoubleValue( "egt-degf", net->egt[i] );
+ node->setDoubleValue( "mp-osi", net->mp_osi[i] );
node->setDoubleValue( "oil-temperature-degf", net->oil_temp[i] );
node->setDoubleValue( "oil-pressure-psi", net->oil_px[i] );
}
SGPropertyNode *node = fgGetNode("/surface-positions", true);
node->setDoubleValue("elevator-pos-norm", net->elevator);
+ node->setDoubleValue("elevator-trim-tab-pos-norm",
+ net->elevator_trim_tab);
node->setDoubleValue("flap-pos-norm", net->flaps);
node->setDoubleValue("left-aileron-pos-norm", net->left_aileron);
node->setDoubleValue("right-aileron-pos-norm", net->right_aileron);