LeeE wrote:

>On Monday 07 January 2008 18:24, LeeE wrote:
>  
>
>>On Monday 07 January 2008 11:07, Chris Metzler wrote:
>>    
>>
>>>On Sun, 6 Jan 2008 23:00:22 +0000
>>>
>>>LeeE wrote:
>>>      
>>>
>>>>Can anyone else confirm this problem on the OSG cvs branch?
>>>>        
>>>>
>>>Yes, I see it too, and have for at least a couple of weeks.
>>>
>>>-c
>>>      
>>>
>>Thanks - confirms it's not just a local problem here.
>>
>>LeeE
>>    
>>
>
>Searching through Aircraft/controls.hxx gives
>
>    enum {
>       ALL_TANKS = -1,
>       MAX_TANKS = 8
>    };
>
>but in Aircraft/controls.cxx there's
>
>FGControls::set_feed_tank( int engine, int tank )
>{ 
>    if ( engine == ALL_ENGINES ) {
>       for ( int i = 0; i < MAX_ENGINES; i++ ) {
>           feed_tank[i] = tank;
>           CLAMP( &feed_tank[i], -1, 4 );
>       }
>    } else {
>       if ( (engine >= 0) && (engine < MAX_ENGINES) ) {
>          
>           CLAMP( &feed_tank[engine], -1, 4 );
>       }
>    } 
> //   feed_tank[engine] = engine;
>}
>
>If these bits of code are relevant to the problem MAX_TANKS seems 
>too low - many large aircraft will have more than 8 fuel tanks.
>
>If I understand CLAMP syntax correctly, it's limiting the value to 
>4, which ties in with the number of tank nodes that are created by 
>default.
>
>I didn't find any other occurrences of 'tank' in the FG source code 
>that seemed relevant.
>
>LeeE
>
>-------------------------------------------------------------------------
>Check out the new SourceForge.net Marketplace.
>It's the best place to buy or sell services for
>just about anything Open Source.
>http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>_______________________________________________
>Flightgear-devel mailing list
>Flightgear-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>
>
>  
>
I'm, pretty certain that might be my code for the handling a 747 fuel 
system.  It has nothing to do with how nasal handles fuel.

In a nut shell, the 747 plumbing feeds the engines from 5 tanks, the 
center and four wing tanks through a combination of shutoff controls and 
cross-feed valves. In graph theory this can be represented as a fully 
connected graph where any engine can "suck" fuel from any one of the 
five tanks or any tank can feed all four engines.  Reserve tanks 
transfer fuel to the main feed tanks, but CANNOT feed the engines via 
the fuel manifold.  So yes, you can have more tanks than those that 
directly feed engines.  In the 747 or any large complex system, mess up 
your fuel panel and you starve an engine.  This is accurately modeled in 
the 747 sim.

The 747 FMS model determines which tank is feeding which engine and sets 
the value of "tank" accordingly.  A "-1" indicates no fuel connection 
for the engine. This value in turn is passed to FG via the native_ctrls 
protocol/packet and passed in turn to JSBSim via the jsbsim.cxx module. 
Unfortunately, the supporting code is not part of the JSBSim baseline so 
it is impossible to see how it works , although it has been submitted a 
while back. You can see the supporting source changes by downloading the 
tar file of the code used at a Mathworks expo and will be usedat the 
upcoming Linux show in February.   Look at the FGEngine.cxx, jsbsim,cxx 
and FGTurbine.cxx modules in the modified jsbsim code.

Personally, I don't like the way fuel is currently modeled in FG and 
really don't like using a scripting language to do real-time execution, 
but that's just me I guess  ;-)  Happy to share the code and my ideas, 
but not the primary author or responsible agent for that capability so I 
live with the problem and update my version of the source as required 
with each FG release.

Regards
John W.






-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to