Sweet, thanks for linking the library, TheEagle.
And oh, right. Well first, good health to you, wlbragg, but I have also failed to answer your question.
It could very well be a system specific bug, but I think Polly was able to confirm this, too, but perhaps in a different way (cause I think the propeller on my installation just keeps going).
Anyway, I have added some std::couts to drain and fill in fgtank.cpp and
- Code: Select all
double FGTank::Calculate(double dt, double TAT_C)
{
if(ExternalFlow < 0.) Drain( -ExternalFlow *dt);
else Fill(ExternalFlow * dt);
if (Temperature == -9999.0) return 0.0;
double HeatCapacity = 900.0; // Joules/lbm/C
double TempFlowFactor = 1.115; // Watts/sqft/C
double Tdiff = TAT_C - Temperature;
double dTemp = 0.0; // Temp change due to one surface
if (fabs(Tdiff) > 0.1 && Contents > 0.01) {
dTemp = (TempFlowFactor * Area * Tdiff * dt) / (Contents * HeatCapacity);
}
return Temperature += (dTemp + dTemp); // For now, assume upper/lower the same
}
Is a bit confusing to me since it keeps on calling Fill a lot...but again, I don't want to drag this out any further, I'll write something up for Git later. I'm feeling a bit run down myself, to be honest.
But for the further questions I am seeing now:
>What happens when you drive the fuel down under the 9 lbs, will it run out then?
If I drag it under the threshold, it chokes out after a little bit...not immediately so maybe there's a bit of give between nasal and the cpp code -shrug-
And at the moment all my tests are with the modified nasal script the one that checks against the unusable instead of 0.
>What happens when you try to start it under 9 lbs?
"out of fuel" (but with my edited nasal script)
>Does selecting only one tank make a difference?
A single tank over the threshold starts the plane successfully
>Does shutting off the fuel flow make a difference?
If you mean fuel mixture? then yes. It chokes out.
If you mean pulling the throttle to 0? then yes, it chokes out.
In fact, it chokes at 5% or so (I just pulled it out awkwardly in one stuttery go and it seemed to have started to choke above zero but definetely then died at 0)
----
A quick re-run with the origina script:
It starts up just fine under 9 pounds but...oh it died now.
Weird.
It does not start up again, but also does not 'print' on the gui that the fuel's gone either.
If I drag even one tank up again over 9 pounds it starts again, even if I drag it down afterwards.
If I drag it down afterwards then it will run for ~10 seconds and then die.
Might be 6 seconds, really.
In other words, original script:
start above 9 pounds? in either tank? starts up.
drag it below 9 pounds while it's running: it runs a bit, then chokes out.
try to start it after a chokeout from being below 9 pounds: it won't start (but also won't print that it's out of fuel)
drag the fuel back over 9 pounds after the chokeout, it will start, even if one drags the slider down below 9 pounds.
The simple act of going above 9 pounds reinvigorates the system and gives it a bit of life that makes the engine run for ~10 seconds if one drags it underneath 'usable fuel levels' of 9 pounds.
But I cannot 'naturally' drain the plane during flight, unless time multiplication is on really high like 32x ...which again I assume makes the timestep so dramatic that it 'bites off' enough from the value to trigger it.