From 00efc0960f880b50ed25eba4bc15a0ff84abaf9f Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 21 Mar 2006 18:51:57 +0000 Subject: [PATCH] Add fuel pressure. --- src/Network/native_fdm.cxx | 4 ++++ src/Network/net_fdm.hxx | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Network/native_fdm.cxx b/src/Network/native_fdm.cxx index 547ba1f4d..b1bebc5f8 100644 --- a/src/Network/native_fdm.cxx +++ b/src/Network/native_fdm.cxx @@ -171,6 +171,7 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) { } net->rpm[i] = node->getDoubleValue( "rpm" ); net->fuel_flow[i] = node->getDoubleValue( "fuel-flow-gph" ); + net->fuel_px[i] = node->getDoubleValue( "fuel-px-psi" ); net->egt[i] = node->getDoubleValue( "egt-degf" ); // cout << "egt = " << aero->EGT << endl; net->cht[i] = node->getDoubleValue( "cht-degf" ); @@ -254,6 +255,7 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) { net->eng_state[i] = htonl(net->eng_state[i]); htonf(net->rpm[i]); htonf(net->fuel_flow[i]); + htonf(net->fuel_px[i]); htonf(net->egt[i]); htonf(net->cht[i]); htonf(net->mp_osi[i]); @@ -335,6 +337,7 @@ void FGNetFDM2Props( FGNetFDM *net, bool net_byte_order ) { net->eng_state[i] = htonl(net->eng_state[i]); htonf(net->rpm[i]); htonf(net->fuel_flow[i]); + htonf(net->fuel_px[i]); htonf(net->egt[i]); htonf(net->cht[i]); htonf(net->mp_osi[i]); @@ -433,6 +436,7 @@ void FGNetFDM2Props( FGNetFDM *net, bool net_byte_order ) { node->setDoubleValue( "rpm", net->rpm[i] ); node->setDoubleValue( "fuel-flow-gph", net->fuel_flow[i] ); + node->setDoubleValue( "fuel-px-psi", net->fuel_px[i] ); node->setDoubleValue( "egt-degf", net->egt[i] ); node->setDoubleValue( "cht-degf", net->cht[i] ); node->setDoubleValue( "mp-osi", net->mp_osi[i] ); diff --git a/src/Network/net_fdm.hxx b/src/Network/net_fdm.hxx index 3ede19960..d5a12454e 100644 --- a/src/Network/net_fdm.hxx +++ b/src/Network/net_fdm.hxx @@ -22,7 +22,7 @@ // I am not aware of any platforms that don't use 4 bytes for float // and 8 bytes for double. -const uint32_t FG_NET_FDM_VERSION = 23; +const uint32_t FG_NET_FDM_VERSION = 24; // Define a structure containing the top level flight dynamics model @@ -84,6 +84,7 @@ public: uint32_t eng_state[FG_MAX_ENGINES];// Engine state (off, cranking, running) float rpm[FG_MAX_ENGINES]; // Engine RPM rev/min float fuel_flow[FG_MAX_ENGINES]; // Fuel flow gallons/hr + float fuel_px[FG_MAX_ENGINES]; // Fuel pressure psi float egt[FG_MAX_ENGINES]; // Exhuast gas temp deg F float cht[FG_MAX_ENGINES]; // Cylinder head temp deg F float mp_osi[FG_MAX_ENGINES]; // Manifold pressure -- 2.39.5