//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <simgear/compiler.h>
#include <math.h>
-#include STL_FSTREAM
-#include STL_IOSTREAM
+#include <fstream>
+#include <iostream>
#include <Main/fg_props.hxx>
// Torque = 0;
Torque_SI = 0;
CHT = 298.0; //deg Kelvin
- CHT_degF = (CHT_degF * 1.8) - 459.67; //deg Fahrenheit
+ CHT_degF = (CHT * 1.8) - 459.67; //deg Fahrenheit
Mixture = 14;
Oil_Pressure = 0; // PSI
Oil_Temp = 85; // Deg C
}
if((i == 0) && (AFR_actual < AFR[i])) {
// Assume linear extrapolation of the slope between the first two points for points before the first point
- dydx = (mixPerPow[i] - mixPerPow[i-1]) / (AFR[i] - AFR[i-1]);
- mixPerPow_actual = mixPerPow[i] + dydx * (AFR_actual - AFR[i]);
+ dydx = (mixPerPow[1] - mixPerPow[0]) / (AFR[1] - AFR[0]);
+ mixPerPow_actual = mixPerPow[0] + dydx * (AFR_actual - AFR[0]);
return mixPerPow_actual;
}
if(AFR_actual == AFR[i]) {