HI, 

Had been running with fg-2.4 for some time and finally getting around to 
upgrading to 2.8. Seems there where some changes to the fuel and tanking system 
in JSBSiim starting with 2.6. It "breaks" the mods made to the code to support 
the 737/747 full scale cockpits tanking models in 2.4 and prior. 

In large aircraft such as the 7x7 types the fuel is NOT drawn equally from all 
tanks. Rather, in terms of graph theory, you should think of the tanking system 
as a fully connected graph for the tanks, engines, and crossfeed valves. Such 
that any feed tank can feed any engine or all engines can draw from one feed 
tank. The case where all tanks feed to a manifold that supplies all engines is 
just one special case. 

At any rate, is there a writeup on the changes? Or might the author find some 
time to describe what was changed? 

Having trouble understanding how to the "FuelExpended" variable to a specific 
tank and how to pass the tank contents onto the flightgear side. 
Here is how it works in my 2.4: 

this was the mod to the FGEngine::ConsumeFuel(void) in 2.4 

if ( Active_Tank >= 0 ) { 
Tank = Propulsion->GetTank(Active_Tank); 
if (Tank->GetType() == FGTank::ttFUEL) { 
//Fshortage += Tank->Drain(CalcFuelNeed()/TanksWithFuel); // SEE NOTE ABOVE 
Fshortage += Tank->Drain(CalcFuelNeed() ); 
} 
} else Starved = true; 

where "Active_Tank" was a value passed from the cockpit fuel control panel (via 
network controls) to fg and the fg/jsbsim interface in jsbsim.cpp. 

and this was the code to transfer fuel in the 737 model to the center feed tank 

// Remove equal amount of fuel from each feed tank. 
// FuelNeeded = FuelToBurn/TanksWithFuel; 
// for (i=0; i<FeedList.size(); i++) { 
// Tank = Propulsion->GetTank(FeedList[i]); 
// Tank->Drain(FuelNeeded); 
// } 

Tank_0 = Propulsion->GetTank(0); 
double center_fuel = Tank_0->GetContents(); 
if ( center_fuel < 6000.0 ) transfer = true; 
else if ( center_fuel > 9000.0 ) transfer = false; 
if ( transfer ) { 
Tank_1 = Propulsion->GetTank(1); 
if ( Tank_1->GetContents() > 100.0 ) { 
Tank_0->Fill( 0.040 ); 
Tank_1->Drain( 0.040 ); 
} 
Tank_2 = Propulsion->GetTank(2); 
if ( Tank_2->GetContents() > 100.0 ) { 
Tank_0->Fill( 0.0401 ); 
Tank_2->Drain( 0.0401 ); 
} 
} 

So setting Active_Tank=0 has both engines drawing from the center tank and when 
it drops below 6000# the fuel transfer system fills until it reaches 9000# or 
the pilot can select, via the fuel control panel, to feed each engine directly 
or crossfeed as desired. Setting Active_Tank=-1 starves the engine. 

The 747 is much more complex and, in the interest of brevity, is not discussed. 

The entire function "ConsumeFuel" is removed and having some difficulty 
undestanding how "FuelExpended" is interfaced to draw down the tanks. 

Any help would be apprecuated. 

John 

----- Original Message -----

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to