]> 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 67f25792f83120bdd7ffcb6fd3d0dc7b65107938..ba599925dc690201d3532dbcfa38b202f87d34e0 100644 (file)
@@ -55,7 +55,6 @@
 #endif
 
 #include "globals.hxx"
-#include "options.hxx"
 #include "save.hxx"
 #include "fg_init.hxx"
 #include <simgear/misc/props.hxx>
@@ -131,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",
@@ -714,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
@@ -769,7 +796,6 @@ void
 FGBFI::setSpeedNorth (double speed)
 {
   if (getSpeedNorth() != speed) {
-    globals->get_options()->set_uBody(speed);
     current_aircraft.fdm_state->set_Velocities_Local(speed,
                                                     getSpeedEast(),
                                                     getSpeedDown());
@@ -795,7 +821,6 @@ void
 FGBFI::setSpeedEast (double speed)
 {
   if (getSpeedEast() != speed) {
-    globals->get_options()->set_vBody(speed);
     current_aircraft.fdm_state->set_Velocities_Local(getSpeedNorth(),
                                                     speed,
                                                     getSpeedDown());
@@ -821,7 +846,6 @@ void
 FGBFI::setSpeedDown (double speed)
 {
   if (getSpeedDown() != speed) {
-    globals->get_options()->set_wBody(speed);
     current_aircraft.fdm_state->set_Velocities_Local(getSpeedNorth(),
                                                     getSpeedEast(),
                                                     speed);