]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/bfi.cxx
Added manifold pressure to the property manager.
[flightgear.git] / src / Main / bfi.cxx
index e4fb0fb5e3d5ff08ec79f0d8aae6749c05855b9c..ba599925dc690201d3532dbcfa38b202f87d34e0 100644 (file)
@@ -130,6 +130,10 @@ FGBFI::init ()
                               getRPM, 0);
   current_properties.tieDouble("/engines/engine0/egt",
                               getEGT, 0);
+  current_properties.tieDouble("/engines/engine0/cht",
+                              getCHT, 0);
+  current_properties.tieDouble("/engines/engine0/mp",
+                              getMP, 0);
 
                                // Velocities
   current_properties.tieDouble("/velocities/airspeed",
@@ -713,6 +717,30 @@ FGBFI::getEGT ()
 }
 
 
+/**
+ * Return the current engine0 CHT.
+ */
+double
+FGBFI::getCHT ()
+{
+  if ( current_aircraft.fdm_state->get_engine(0) != NULL ) {
+      return current_aircraft.fdm_state->get_engine(0)->get_CHT();
+  }
+}
+
+
+/**
+ * Return the current engine0 CHT.
+ */
+double
+FGBFI::getMP ()
+{
+  if ( current_aircraft.fdm_state->get_engine(0) != NULL ) {
+      return current_aircraft.fdm_state->get_engine(0)->get_Manifold_Pressure();
+  }
+}
+
+
 \f
 ////////////////////////////////////////////////////////////////////////
 // Velocities