RE: [Flightgear-devel] Tried the Spitfire

2004-07-28 Thread Vivian Meazza

Andy Ross wrote:
 Sent: 27 July 2004 20:03
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 
 Vivian Meazza wrote:
  I have run several traces on fuel.nas, and I can see the 
  /consumables/fuel/tank[0]/kill-when-empty being set, despite not 
  appearing anywhere (I searched the entire directory) other 
 than once 
  in fuel.nas, and certainly not in my configuration file. Hence my 
  original question.
 
 That's just bizarre, and if true points to something really 
 scary like a memory corruption issue or reference goof in the 
 interpreter and/or property system.  Can you send the trace 
 output?  Are you sure you can do this repeatably?  If this is 
 real, then the solution is
 *ABSOLUTELY* not to hack around with Nasal code to make it work. :)

It is repeatable.

Here is my trace:

Tank: Upper
lbs: 0.05162055521023967
t.getBoolValue(selected):
t.getBoolValue(kill-when-empty):
Tank: Lower
lbs: 257.9001210153514
t.getBoolValue(selected):
t.getBoolValue(kill-when-empty):
Tank: Upper
lbs: -0.04993153503164649
t.getBoolValue(selected):
t.getBoolValue(kill-when-empty):
t.getBoolValue(selected): 1
Tank: Lower
lbs: 257.9018100355301
t.getBoolValue(selected):
t.getBoolValue(kill-when-empty):
Tank: Upper
lbs: -0.04279845859855413
t.getBoolValue(selected): 1
t.getBoolValue(kill-when-empty): 1
t.getBoolValue(kill-when-empty): 1
outOfFuel: 1
Tank: Lower
lbs: 257.8590115769315
t.getBoolValue(selected):
t.getBoolValue(kill-when-empty):
Tank: Upper
lbs: -0.001188846072182059
t.getBoolValue(selected): 1
t.getBoolValue(kill-when-empty): 1
t.getBoolValue(kill-when-empty): 1
outOfFuel: 1
Tank: Lower
lbs: 257.8578227308593
t.getBoolValue(selected):
t.getBoolValue(kill-when-empty):

Here is a dump of the property tree at the same time:

consumables {NONE} = nil
consumables/fuel {NONE} = nil
consumables/fuel/tank {BOOL} = 1
consumables/fuel/tank/name {UNSPECIFIED} = Upper
consumables/fuel/tank/level-gal_us {DOUBLE} = 0
consumables/fuel/tank/level-lbs {DOUBLE} = 0
consumables/fuel/tank/density-ppg {DOUBLE} = 5.9956915326
consumables/fuel/tank/capacity-gal_us {DOUBLE} = 55.8390941939
consumables/fuel/tank/selected {BOOL} = 1
consumables/fuel/tank[1] {NONE} = nil
consumables/fuel/tank[1]/name {UNSPECIFIED} = Lower
consumables/fuel/tank[1]/level-gal_us {DOUBLE} = 42.97630687451017
consumables/fuel/tank[1]/level-lbs {DOUBLE} = 257.8578227308593
consumables/fuel/tank[1]/density-ppg {DOUBLE} = 5.9956915326
consumables/fuel/tank[1]/capacity-gal_us {DOUBLE} = 43.0043530412
consumables/fuel/tank[1]/selected {BOOL} = 1
consumables/fuel/tank[2] {NONE} = nil
consumables/fuel/tank[2]/level-gal_us {DOUBLE} = 0
consumables/fuel/tank[2]/level-lbs {DOUBLE} = 0
consumables/fuel/tank[2]/capacity-gal_us {DOUBLE} = 0.01
consumables/fuel/tank[2]/density-ppg {DOUBLE} = 6
consumables/fuel/tank[2]/selected {BOOL} = 1
consumables/fuel/tank[3] {NONE} = nil
consumables/fuel/tank[3]/level-gal_us {DOUBLE} = 0
consumables/fuel/tank[3]/level-lbs {DOUBLE} = 0
consumables/fuel/tank[3]/capacity-gal_us {DOUBLE} = 0.01
consumables/fuel/tank[3]/density-ppg {DOUBLE} = 6
consumables/fuel/tank[3]/selected {BOOL} = 1
consumables/fuel/total-fuel-gals {DOUBLE} = 42.97630687451017
consumables/fuel/total-fuel-lbs {DOUBLE} = 257.8578227308593
consumables/fuel/total-fuel-norm {DOUBLE} = 0.4347481767751226

Kill-when-empty is NOT in my configuration file as you can see.

If there isn't a problem here, I don't know of a better example. 

 
  I can also see outofFuel being set, and the engine being cut when 
  tank[0] is empty and tank[1] has plenty of fuel in it.
 
 Once again: this is not a bug.  By your original explanation 
 (correct me if I'm wrong): tank[1] is never selected, and 
 simply feeds tank[0]. If it's not selected the engine won't 
 feed from it.  If tank[0] is empty, the engine will get no fuel.

I'm sorry, but it is a bug. Both tanks are selected as you can see. 

 
 Can you try being really, explicitly verbose about your 
 problem? Leave out the Nasal bugs and analysis.  Just give me 
 the behavior you want to see from the two tanks and two fuel 
 selector switches.

Extracts from the POH are posted at:

http://myweb.tiscali.co.uk/vmeazza/FlightGear/Fuel%20System.JPG

And

http://myweb.tiscali.co.uk/vmeazza/FlightGear/Fuel%20System%20Diagram.JPG

I think the description and diagram speak for themselves, but if you have
any further queries, get back to me soonest.

All that is required, is that fuel.nas works in accordance with its logic.
When it does everything is OK. If you are too busy, I already have a
solution.

Sorry for the bother, and thank you for your response. 

Regards,

Vivian Meazza


 



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Vivian Meazza

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 David Megginson
 Sent: 26 July 2004 23:41
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 
 Vivian Meazza wrote:
 
  I think I would expect an engine running out of fuel to 
 rapidly lose 
  power and wind down, not stop abruptly as it would if you 
 opened the 
  magneto switches. I have to say that is based on motor 
 racing rather 
  than aviation experience. Haven't tried it while airborne, 
 and intend 
  to avoid it if at all possible.
 
 I don't intend to try it either.  The propeller should keep 
 windmilling, of 
 course, but I don't see how the cylinders would fire once the 
 fuel supply 
 was cut off.  Even if there's still a trickle for a few 
 seconds, the mixture 
 would probably be too lean to ignite.  Perhaps there would be 
 some surging 
 and roughness, as pockets of fuel separated by air fed into 
 various cylinders.

There is a strong possibility that air will be drawn into the fuel supply as
the last of the fuel runs out from a tank (which is why it is good practice
to disconnect empty fuel tanks.)


  Slightly higher would be the suggestion that out-of-fuel 
 should not be 
  terminal though, since pilot error can end up with a full tank not 
  connected to the engine. In real life - reconnect - problem 
 solved (or 
  nearly). So far as I can see that is not an option in our sim.
 
 That's not an uncommon occurrence on low-wing planes, from 
 what I hear: when 
 Cessna pilots rent low-wing planes, you sometimes get forced 
 landings with 
 one tank full and one empty (that happened in Toronto Harbour 
 last fall, 
 with no injuries, fortunately).
 

I think our sim should cater for that, otherwise our realism is degraded.

Regards

Vivian



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Vivian Meazza

Matthew Law wrote

 Sent: 26 July 2004 23:41
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 
 Vivian Meazza wrote:
 
 I think I would expect an engine running out of fuel to rapidly lose 
 power and wind down, not stop abruptly as it would if you opened the 
 magneto switches. I have to say that is based on motor racing rather 
 than aviation experience. Haven't tried it while airborne, 
 and intend 
 to avoid it if at all possible.
 
 A nice-to-have anyway, although I think I could fix it if we 
 agree that 
 we want to go down that route. Very definitely low on the list of 
 priorities.
 
 Slightly higher would be the suggestion that out-of-fuel 
 should not be 
 terminal though, since pilot error can end up with a full tank not 
 connected to the engine. In real life - reconnect - problem 
 solved (or 
 nearly). So far as I can see that is not an option in our sim.
 
 
 If it were implmented, may be some of the code could be used for a 
 carb-ice scenario?  Where application of carb heat would 
 hopefully bring 
 the engine back up to full power again.  This is a feature 
 that I would 
 love to see working well in FG - especially when the 
 conditions are ripe 
 for carb ice (which sadly, is most of the year in the UK).  
 Would this 
 need to be done seperately for each FDM/engine combo?
 

I don't think that's intrinsically very difficult to simulate right now.
When certain conditions are met, if carb heating is off, weaken the mixture
over time (until the engine stops?). If carb heating is on enrich the
mixture over time until power is restored. The conditions are actually
aircraft and engine specific, I think, but a general solution might be near
enough for government work.

It could be very quickly implemented with a nasal script, but this might not
be the best way to do it. 

Pitot head icing is another candidate. Actually it's so obvious, I wonder if
someone will tell us that it is already an intrinsic function?
 
My feeling is that we should address this idc. 

Regards

Vivian



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Erik Hofman
Vivian Meazza wrote:
Pitot head icing 
It might be a bit early, but I seriously read pilot head icing at first ...
Erik
(Is that already implemented?)
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Vivian Meazza


Erik Hofman wrote:

 Sent: 27 July 2004 08:37
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 
 Vivian Meazza wrote:
 
  Pitot head icing
 
 It might be a bit early, but I seriously read pilot head 
 icing at first ...
 
 Erik
 
 (Is that already implemented?)
 

Lol. I suppose if you fly the Spitfire with the canopy open ... I don't
think I'll bother to implement that. On the other hand goggles icing up ...
Didn't someone mention windscreen icing ... Forget it. I've enough problems
with doing blow-in flaps for the Spitfire.

Mastered the Spitfire yet? 

Regards

Vivian



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Erik Hofman
Vivian Meazza wrote:
Mastered the Spitfire yet? 
Yes. It's a marvelous aircraft to fly!
Erik
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Vivian Meazza


Erik Hofman replied

 Sent: 27 July 2004 09:29
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 
 Vivian Meazza wrote:
 
  Mastered the Spitfire yet?
 
 Yes. It's a marvelous aircraft to fly!
 

Good. It'll be better when the engine problems are sorted. On legacy code
it's down on power, I think, although that probably makes it easier to fly.

I was wondering because people seem to have had problems starting it.

Regards,

Vivian



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Boris Koenig
Vivian Meazza wrote:
Matthew Law wrote
If carb heating is on enrich the
mixture over time until power is restored. The conditions are actually
aircraft and engine specific, I think
wow, I am just about to notice how much work some people spend on really
resembling all the various aircraft subtleties properly ... didn't know
that so far, would definitely recommend to create some kind of summary
for each aircraft and place it as a textfile into each aircraft's folder.
Many such things aren't that obvious, and even if they are it's
interesting how these things are implemented or what workaround is being
used to resemble a certain functionality.
On the other hand such a detailed description of the implementation
could also provide some insights for other user who want to create
their own aircraft, or simply extend pre-existing aircraft.
-
Boris
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Matthew Law
Boris Koenig wrote:
wow, I am just about to notice how much work some people spend on really
resembling all the various aircraft subtleties properly ... didn't know
that so far, would definitely recommend to create some kind of summary
for each aircraft and place it as a textfile into each aircraft's folder.
Many such things aren't that obvious, and even if they are it's
interesting how these things are implemented or what workaround is being
used to resemble a certain functionality.
On the other hand such a detailed description of the implementation
could also provide some insights for other user who want to create
their own aircraft, or simply extend pre-existing aircraft.

Things like carb ice may be a hinderance to the casual user (having it 
disabled by default would probably be the way to go)  but since there 
are so many aircraft and pilots lost to it, it's fairly important for me 
even in a sim.  Does Nasal do timers?  If so maybe something like this 
would work:

while (engines_running)
{
 If (engine rpm  40%  OAT  4 deg C  OAT  15 deg C)
 {
 if (carb_heat_enabled == false)
{
lean_mixture_by_increment;   // lean mixture by a small value 
from user selected value
 }
 else
 {
 enrich_mixture_by_increment; // richen mixture by a small 
value until equal to user selected value
  }
 }
 else
 {
 enrich_mixture_by_increment; // as above, but by a smaller amount, 
for higher power settings ?
 }

 sleep 20 secs;
}
Please excuse the pseudo code - I've never done any nasal at all.  I 
can't remember what temperature range carb ice most commonly occurs at 
and I'm not sure that after partial icing, a higher power setting would 
clear the ice... probably not.

How does this seem?
All the best,
Matthew.
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread David Megginson
Vivian Meazza wrote:
I don't think that's intrinsically very difficult to simulate right now.
When certain conditions are met, if carb heating is off, weaken the mixture
over time (until the engine stops?). If carb heating is on enrich the
mixture over time until power is restored. The conditions are actually
aircraft and engine specific, I think, but a general solution might be near
enough for government work.
With carb ice, the engine dies from an excessively rich mixture (all fuel, 
no air), not an excessively lean one.  The best way to simulate an ice 
blockage would be to reduce maximum available manifold pressure and let the 
piston engine model work out the rest.

When there is no actual carb ice, carb heat makes the intake air hotter, and 
thus thinner, so the mixture also becomes richer (more fuel, less air), but 
in this case not usually rich enough to stop the engine.

The normal rule of thumb is that applying carb heat will decrease your 
power, but that's not true for those of us who fly lean of peak.

Pitot head icing is another candidate. Actually it's so obvious, I wonder if
someone will tell us that it is already an intrinsic function?
We don't actually have code to create pitot ice (or melt it when pitot heat 
is on), but you can simulate pitot icing by setting the 
/systems/pitot/serviceable property to 'true'.  You can also use 
/systems/static/serviceable to simulate a static-port blockage, 
/systems/electrical/serviceable to simulate an electrical failure (battery 
and alternator, I guess), and /systems/vacuum[n]/serviceable to simulate a 
failure of a vacuum pump.  All of the instruments should respond 
more-or-less realistically to the failure.

All the best,
David
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: Carb ice (was Re: [Flightgear-devel] Tried the Spitfire)

2004-07-27 Thread Matthew Law
David Megginson wrote:
I don't think we should disable any systems, period, but we can put 
users by default in situations where carb icing is unlikely (i.e. a 
clear, dry day).  Once you get into situations where carb icing is 
likely, users are going to be dealing with other problems like reduced 
visibility anyway.
I agree totally.  Does FG define humidity at all? - from what I've read 
and understood on my PPL course and in the UK CAA leaflets the major 
component of carb ice is the humidity and temperature combination.  
We're drilled to use carb heat before making any major reduction in 
power (below the green arc) on the C152 and C150 and in/near 
precipitation if icing is suspected.  I've never read the POH for these, 
I just do what my instructor tells me.

Carb icing is common on humid days in certain Continental engines such 
as the one in the Cessna 150 and the old (pre-1967) 172, but it is 
very rare in engines like the Lycoming O-320 (used in the Warrior and 
post-1967 Cessna 172's).  The warnings in the later 172 POH's about 
using carb heat at low power are left over from the old Continental 
O-300 days -- the Warrior has essentially the same engine, but my POH 
does not recommend carb heat for low power operation unless I suspect 
actual icing.

We lost a C150 last week to suspected carb ice.  The engine stopped dead 
on base leg when the pilot (a recent PPL graduate) throttled down to 
descend for landing.  The 'landing' appears to have been rather hard as 
the 'plane is a write-off.  Thankfully he's OK...  I think my Vans RV-9 
will have a diesel engine :-)

All the best,
Matthew.
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: Carb ice (was Re: [Flightgear-devel] Tried the Spitfire)

2004-07-27 Thread Matthew Law
David Megginson wrote:
I don't think we should disable any systems, period, but we can put 
users by default in situations where carb icing is unlikely (i.e. a 
clear, dry day).  Once you get into situations where carb icing is 
likely, users are going to be dealing with other problems like reduced 
visibility anyway.
I agree totally.  Does FG define humidity at all? - from what I've read 
and understood on my PPL course and in the UK CAA leaflets the major 
component of carb ice is the humidity and temperature combination.  
We're drilled to use carb heat before making any major reduction in 
power (below the green arc) on the C152 and C150 and in/near 
precipitation if icing is suspected.  I've never read the POH for these, 
I just do what my instructor tells me.

Carb icing is common on humid days in certain Continental engines such 
as the one in the Cessna 150 and the old (pre-1967) 172, but it is 
very rare in engines like the Lycoming O-320 (used in the Warrior and 
post-1967 Cessna 172's).  The warnings in the later 172 POH's about 
using carb heat at low power are left over from the old Continental 
O-300 days -- the Warrior has essentially the same engine, but my POH 
does not recommend carb heat for low power operation unless I suspect 
actual icing.

We lost a C150 last week to suspected carb ice.  The engine stopped dead 
on base leg when the pilot (a recent PPL graduate) throttled down to 
descend for landing.  The 'landing' appears to have been rather hard as 
the 'plane is a write-off.  Thankfully he's OK...  I think my Vans RV-9 
will have a diesel engine :-)

All the best,
Matthew.
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: Carb ice (was Re: [Flightgear-devel] Tried the Spitfire)

2004-07-27 Thread David Megginson
Matthew Law wrote:
I agree totally.  Does FG define humidity at all?
Yes -- we report it, and I'm pretty sure that we use it in density altitude 
calculations (so that it affects both true airspeed and engine performance).

We're drilled to use carb heat before making any major reduction in 
power (below the green arc) on the C152 and C150 and in/near 
precipitation if icing is suspected.  I've never read the POH for these, 
I just do what my instructor tells me.
The Continental engine on the C150 (and presumably 152) and the older 172s 
and 182s is often referred to by pilots as an ice maker: it has about the 
worst possible design for carb ice, so you absolutely should be using the 
carb heat for any power reduction, even if the OAT is 25-30 degC.  As I 
mentioned, 172s built after 1967, and Cherokees, do not have the same kind 
of problem.

We lost a C150 last week to suspected carb ice.  The engine stopped dead 
on base leg when the pilot (a recent PPL graduate) throttled down to 
descend for landing.  The 'landing' appears to have been rather hard as 
the 'plane is a write-off.  Thankfully he's OK...  I think my Vans RV-9 
will have a diesel engine :-)
Sure, or a fuel-injected engine, or (as I mentioned) a Lycoming O-320, which 
has a great record.  Of course, we're all waiting for the big hydrogen 
engines (I'll take 25 liters of water, please).  If I were building my own 
plane right now, I'd probably go for a fuel-injected engine like the IO-360, 
so that I could add Gamijectors and even out the fuel/air distribution for a 
nice smooth, quiet engine.  Of course, hot starts in a fuel-injected engine 
are quite a challenge ...

Avoid Rotax engines -- they're so advanced that they do not even need carb 
ice to stop running (the flight school next to our flying club has three 
Katanas: they've already had two forced landings bad enough to result in TSB 
reports, and who knows how many uneventful ones on runways; no serious 
injuries, though).

All the best,
David

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Vivian Meazza


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 David Megginson
 Sent: 27 July 2004 12:39
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 
 Vivian Meazza wrote:
 
  I don't think that's intrinsically very difficult to simulate right 
  now. When certain conditions are met, if carb heating is 
 off, weaken 
  the mixture over time (until the engine stops?). If carb 
 heating is on 
  enrich the mixture over time until power is restored. The 
 conditions 
  are actually aircraft and engine specific, I think, but a general 
  solution might be near enough for government work.
 
 With carb ice, the engine dies from an excessively rich 
 mixture (all fuel, 
 no air), not an excessively lean one.  The best way to 
 simulate an ice 
 blockage would be to reduce maximum available manifold 
 pressure and let the 
 piston engine model work out the rest.
 
 When there is no actual carb ice, carb heat makes the intake 
 air hotter, and 
 thus thinner, so the mixture also becomes richer (more fuel, 
 less air), but 
 in this case not usually rich enough to stop the engine.
 
 The normal rule of thumb is that applying carb heat will 
 decrease your 
 power, but that's not true for those of us who fly lean of peak.
 
  Pitot head icing is another candidate. Actually it's so obvious, I 
  wonder if someone will tell us that it is already an intrinsic 
  function?
 
 We don't actually have code to create pitot ice (or melt it 
 when pitot heat 
 is on), but you can simulate pitot icing by setting the 
 /systems/pitot/serviceable property to 'true'.  You can also use 
 /systems/static/serviceable to simulate a static-port blockage, 
 /systems/electrical/serviceable to simulate an electrical 
 failure (battery 
 and alternator, I guess), and /systems/vacuum[n]/serviceable 
 to simulate a 
 failure of a vacuum pump.  All of the instruments should respond 
 more-or-less realistically to the failure.
 
 

I knew someone would know. Yes of course carb icing makes the mixture over
rich - leaning it was a quick stab at reducing the power. Your suggestion is
obviously the way to go. Much more realistic. Thanks.

I think we could easily extend the existing pitot stuff to be a bit more
realistic with some nasal.

Bit of a roundtuit I'm afraid though, I really ought to finish the Spitfire
first.


Regards,

Vivian

 



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Vivian Meazza

Matthew Law wrote 

 Sent: 27 July 2004 11:55
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 
 Boris Koenig wrote:
 
  wow, I am just about to notice how much work some people spend on 
  really resembling all the various aircraft subtleties properly ... 
  didn't know that so far, would definitely recommend to create some 
  kind of summary for each aircraft and place it as a 
 textfile into each 
  aircraft's folder.
 
  Many such things aren't that obvious, and even if they are it's 
  interesting how these things are implemented or what workaround is 
  being used to resemble a certain functionality.
 
  On the other hand such a detailed description of the implementation 
  could also provide some insights for other user who want to create 
  their own aircraft, or simply extend pre-existing aircraft.
 
 
 Things like carb ice may be a hinderance to the casual user 
 (having it 
 disabled by default would probably be the way to go)  but since there 
 are so many aircraft and pilots lost to it, it's fairly 
 important for me 
 even in a sim.  Does Nasal do timers?  If so maybe something 
 like this 
 would work:
 
 while (engines_running)
 {
   If (engine rpm  40%  OAT  4 deg C  OAT  15 deg C)
   {
   if (carb_heat_enabled == false)
  {
  lean_mixture_by_increment;   // lean mixture by a 
 small value 
 from user selected value
   }
   else
   {
   enrich_mixture_by_increment; // richen mixture by a small 
 value until equal to user selected value
}
   }
   else
   {
   enrich_mixture_by_increment; // as above, but by a 
 smaller amount, 
 for higher power settings ?
   }
 
   sleep 20 secs;
 }
 
 Please excuse the pseudo code - I've never done any nasal at all.  I 
 can't remember what temperature range carb ice most commonly 
 occurs at 
 and I'm not sure that after partial icing, a higher power 
 setting would 
 clear the ice... probably not.
 

Yup, all do-able in nasal no probs. David Megginson recommends adjusting the
manifold pressure to simulate icing. That's probably more realistic.

Regards,

Vivian




___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: Carb ice (was Re: [Flightgear-devel] Tried the Spitfire)

2004-07-27 Thread Erik Hofman
David Megginson wrote:
Matthew Law wrote:
I agree totally.  Does FG define humidity at all?

Yes -- we report it, and I'm pretty sure that we use it in density 
altitude calculations (so that it affects both true airspeed and engine 
performance).
METAR reported humidity is also used.
Erik
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Andy Ross
Vivian Meazza wrote:
 Slightly higher would be the suggestion that out-of-fuel should not
 be terminal though, since pilot error can end up with a full tank
 not connected to the engine. In real life - reconnect - problem
 solved (or nearly). So far as I can see that is not an option in our
 sim.

Is that not how it works for you?  Out of fuel is a transient
property.  If you put fuel in the tank, the fuel management code sets
it to false...

Granted, I haven't had time to test any of this.  But I guess I'm
having trouble understanding exactly what your complaint is: trying
to draw fuel from an empty tank *should* kill an engine.

Andy


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Andy Ross
Vivian Meazza wrote:
 David Megginson wrote:
  Vivian Meazza wrote:
   Slightly higher would be the suggestion that out-of-fuel should not
   be terminal though
 
  That's not an uncommon occurrence on low-wing planes, from what I
  hear: when Cessna pilots rent low-wing planes, you sometimes get
  forced landings with one tank full and one empty

 I think our sim should cater for that, otherwise our realism is
 degraded.

But... it does.  For each of those scenarios (fuel selectors with a
both mode and ones which kill the engine when the selected tank runs
dry).  I'm getting really confused here.  What's the bug again?

Andy


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread David Megginson
Andy Ross wrote:
Granted, I haven't had time to test any of this.  But I guess I'm
having trouble understanding exactly what your complaint is: trying
to draw fuel from an empty tank *should* kill an engine.
OK, try this: I'm flying on the left tank in my Warrior and not switching. 
The tank goes dry and the engine stops.  I switch to the right tank, and as 
long as the prop is still windmilling, the engine springs to life again in a 
few seconds.

Is that the way things will work right now?
All the best,
David
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Andy Ross
David Megginson wrote:
 OK, try this: I'm flying on the left tank in my Warrior and not
switching.
 The tank goes dry and the engine stops.  I switch to the right tank,
and as
 long as the prop is still windmilling, the engine springs to life
again in a
 few seconds.

 Is that the way things will work right now?

Yes, exactly.  Or at least, as intended.  The out-of-fuel property is
set, explicitly, every fuel iteration (5Hz I think), to the current
value as computed from the set of selected tanks.

Andy


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Lee Elliott
On Tuesday 27 July 2004 08:37, Erik Hofman wrote:
 Vivian Meazza wrote:
  Pitot head icing

 It might be a bit early, but I seriously read pilot head icing at first ...

 Erik

 (Is that already implemented?)

Perhaps I should look into it for the Swift;)

LeeE

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-27 Thread Arnt Karlsen
On Tue, 27 Jul 2004 07:38:43 -0400, David wrote in message 
[EMAIL PROTECTED]:

 When there is no actual carb ice, carb heat makes the intake air
 hotter, and thus thinner, so the mixture also becomes richer (more
 fuel, less air), but in this case not usually rich enough to stop the
 engine.
 
 The normal rule of thumb is that applying carb heat will decrease your
 power, but that's not true for those of us who fly lean of peak.

..pulling carb heat on flying lean of peak, should produce more
carburtation heat and push the mis-firing limit a bit leaner, but 
does anyone do this?  At some stage, it will get too cold. 

-- 
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread David Megginson
Ampere K. Hardraade wrote:
Can't you make it so that the engine feeds off the upper tank before it feeds 
on the lower tank?
How would that affect balance?  Are the tanks exactly above each other?
All the best,
David
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread Vivian Meazza

David Megginson asked
 Sent: 26 July 2004 12:37
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 Ampere K. Hardraade wrote:
 
  Can't you make it so that the engine feeds off the upper tank before it
 feeds
  on the lower tank?
 
 How would that affect balance?  Are the tanks exactly above each other?
 
 
 All the best,
 
 
 David
 

Not exactly. They are both on the centerline, but the CofG of the lower,
smaller tank is slightly forward of the upper, larger tank.

As the fuel is expended the CofG should move forward and down.

Regards,

Vivian 



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread David Megginson
Vivian Meazza wrote:
Not exactly. They are both on the centerline, but the CofG of the lower,
smaller tank is slightly forward of the upper, larger tank.
For strict accuracy, then, drawing from one tank first and then the other 
will not result in exactly the same flight characteristics.  The different 
may be too small to notice, though.  Andy's suggestion of moving fuel every 
few minutes is definitely better, but it would be good to model flow-through 
tanks properly.

All the best,
David
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread Vivian Meazza


I wrote

 Sent: 25 July 2004 22:32
 To: 'FlightGear developers discussions'
 Subject: RE: [Flightgear-devel] Tried the Spitfire
 
 
 
 
 Andy Ross wrote
  Sent: 25 July 2004 21:07
  To: FlightGear developers discussions
  Subject: Re: [Flightgear-devel] Tried the Spitfire
 
  Vivian Meazza wrote:
   I'm just working on the fuel gauge for the Spitfire, when I
   ralised that I haven't modeled the fuel system correctly. At
   present both tanks feed into the engine. What should happen is
   that the upper tank feeds the lower tank which feeds the
   engine. Is there any built-in way of doing this?
 
  One way to do this is to always make sure the lower tank is
  selected, and the uper one is not.  Then have a Nasal timer fire
  at some sane frequency (mayby 5Hz) or whatnot that takes fuel out
  of the top tank and adds it to the bottom one according to the
  current pump configuration.
 
  It's not hard, really.  You can look at the existing fuel.nas
  code for examples.  The only gotcha I can think of is that the
  frame rate isn't constant: you want to use the time-elapsed
  property to calculate the amount of fuel to transfer, instead of
  assuming a constant amount per iteration.
 
 
 Thanks Andy. I have already put together a Nasal script, using fuel.nas as
 a
 model. It wasn't hard, once I had figured out how to make it re-iterate.
 Nasal is a delight to use: doing exactly what we want.
 
 The script tries to model the fuel system. Both tanks are connected to the
 engine, and there is an open pipe connecting them, so fuel is transferred
 from the upper to the lower whenever there is room in the latter until the
 former is empty. So good so far - that bit works. The gotcha is that the
 engine stops when either tank is empty, rather than when there is no fuel
 in
 any tank. I can't see a way around that without tinkering with the logic
 of
 fuel.nas. That said, the logic of fuel does seem a little odd. Have I got
 my
 analysis of the logic wrong? Where is kill-when-empty set? I can easily
 adjust fuel.nas to work for the Spitfire, but of course I don't want to
 rot
 up any other model. How to proceed?
 

I think that something is going wrong in the fuel.nas script.

At line 72 kill-when-empty is being set to true for tank[0] on the first
pass through after it runs out of fuel, thus setting out-of-fuel to true and
stopping the engine. I don't think that this is intended in the script,
despite the comment at line 53!

I attach a revised script which stops this happening, but I had to resort to
some pretty inelegant programming to do it. Is this a NASAL bug, or
something local?

Regards,

Vivian


fuel.nas
Description: Binary data
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread Vivian Meazza




David Megginson wrote

 Sent: 26 July 2004 13:27
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 Vivian Meazza wrote:
 
  Not exactly. They are both on the centerline, but the CofG of the lower,
  smaller tank is slightly forward of the upper, larger tank.
 
 For strict accuracy, then, drawing from one tank first and then the other
 will not result in exactly the same flight characteristics.  The different
 may be too small to notice, though.  Andy's suggestion of moving fuel
 every
 few minutes is definitely better, but it would be good to model flow-
 through
 tanks properly.
 

I think I've cracked it. I've written a NASAL script which transfers fuel
from the upper to the lower tank with the same frequency as the main fuel
script runs. At the same time the fuel script draws fuel from both tanks.
This is as described in the Pilot's notes. Now I have fixed up the fuel
script, I think it runs OK.

There are still some snags. The engine cuts out very abruptly when the fuel
runs out: I would like some run down as the last of the fuel runs through
the system. Once out-of-fuel is set, it cannot be reset connecting a tank
with fuel in it. Finally, the fuel script disconnects an empty tank. I can
see why this is needed by Andy's clever script, but realistically it should
be disconnected by operator action.

Regards,

Vivian

 



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread Andy Ross
Vivian Meazza wrote:
 The gotcha is that the engine stops when either tank is empty,
 rather than when there is no fuel in any tank. I can't see a
 way around that without tinkering with the logic of
 fuel.nas.

No, there's actually a feature for exactly this situation:

 That said, the logic of fuel does seem a little odd. Have I got my
 analysis of the logic wrong? Where is kill-when-empty set?

By you, in the aircraft configuration.  That's the property that
tells the fuel code to kill the engine when the tank is empty.
If you don't set the property, then the tank will only be
deselected when it is empty.

But, since you only *have* one selectable tank, that's basically the
same thing; the engine is supposed to die when the bottom tank runs
out.  Am I misunderstanding the problem?

Andy


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread David Megginson
Andy Ross wrote:
But, since you only *have* one selectable tank, that's basically the
same thing; the engine is supposed to die when the bottom tank runs
out.  Am I misunderstanding the problem?
I think he might want some sputtering for a couple of seconds.  From reading 
accident reports, sometimes the engine does just stop cold, though.

All the best,
David
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread Vivian Meazza
Andy Ross wrote

 Sent: 26 July 2004 18:05
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 Vivian Meazza wrote:
  The gotcha is that the engine stops when either tank is empty,
  rather than when there is no fuel in any tank. I can't see a
  way around that without tinkering with the logic of
  fuel.nas.
 
 No, there's actually a feature for exactly this situation:

I was thrown at first by the comment, but on further analysis the logic is
fine, but the code doesn't seem to work correctly. When the top tank is
empty the logic requires that, if kill-when-empty is not set, for it to be
simply deselected. This isn't working: the kill-when-empty is being set
somehow, and the engine dies.

  That said, the logic of fuel does seem a little odd. Have I got my
  analysis of the logic wrong? Where is kill-when-empty set?
 
 By you, in the aircraft configuration.  That's the property that
 tells the fuel code to kill the engine when the tank is empty.
 If you don't set the property, then the tank will only be
 deselected when it is empty.

It's being set, for tank[0] on the second pass (I think) through the code
after the deselection pass, thus setting outofFuel and killing the engine
while there is still fuel in the lower tank.
 
 But, since you only *have* one selectable tank, that's basically the
 same thing; the engine is supposed to die when the bottom tank runs
 out.  Am I misunderstanding the problem?

Slightly. Either, none, or both tanks can be selected to feed the engine,
but there is also an interconnecting pipe. No problem, I have done the Nasal
code: pretty straight forward. I have also posted a slightly amended
fuel.nas which works around this mysterious kill-when-empty issue. 


Regards,

Vivian



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread Andy Ross
Vivian Meazza wrote:
 I was thrown at first by the comment, but on further analysis the
 logic is fine, but the code doesn't seem to work correctly. When the
 top tank is empty the logic requires that, if kill-when-empty is not
 set, for it to be simply deselected. This isn't working: the
 kill-when-empty is being set somehow, and the engine dies.

Then the proper fix is to find out what is setting
/consumables/fuel/tank[0]/kill-when-empty at runtime.  This is a
configuration property, it shouldn't be modified by code, ever.

The proper fix is certainly not to hack at fuel.nas trying to make it
work.  So far as I can see, that code is working fine.

Andy

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread Vivian Meazza

David Megginson  wrote

 Sent: 26 July 2004 18:34
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 
 Andy Ross wrote:
 
  But, since you only *have* one selectable tank, that's 
 basically the 
  same thing; the engine is supposed to die when the bottom tank runs 
  out.  Am I misunderstanding the problem?
 
 I think he might want some sputtering for a couple of 
 seconds.  From reading 
 accident reports, sometimes the engine does just stop cold, though.
 

I think I would expect an engine running out of fuel to rapidly lose power
and wind down, not stop abruptly as it would if you opened the magneto
switches. I have to say that is based on motor racing rather than aviation
experience. Haven't tried it while airborne, and intend to avoid it if at
all possible.

A nice-to-have anyway, although I think I could fix it if we agree that we
want to go down that route. Very definitely low on the list of priorities.

Slightly higher would be the suggestion that out-of-fuel should not be
terminal though, since pilot error can end up with a full tank not connected
to the engine. In real life - reconnect - problem solved (or nearly). So far
as I can see that is not an option in our sim. 

Regards

Vivian  



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread Vivian Meazza
Andy Ross wrote

 Sent: 26 July 2004 22:20
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 
 Vivian Meazza wrote:
  I was thrown at first by the comment, but on further analysis the 
  logic is fine, but the code doesn't seem to work correctly. 
 When the 
  top tank is empty the logic requires that, if 
 kill-when-empty is not 
  set, for it to be simply deselected. This isn't working: the 
  kill-when-empty is being set somehow, and the engine dies.
 
 Then the proper fix is to find out what is setting 
 /consumables/fuel/tank[0]/kill-when-empty at runtime.  This 
 is a configuration property, it shouldn't be modified by code, ever.
 
 The proper fix is certainly not to hack at fuel.nas trying to 
 make it work.  So far as I can see, that code is working fine.

I have run several traces on fuel.nas, and I can see the
/consumables/fuel/tank[0]/kill-when-empty being set, despite not appearing
anywhere (I searched the entire directory) other than once in fuel.nas, and
certainly not in my configuration file. Hence my original question. 

I can also see outofFuel being set, and the engine being cut when tank[0] is
empty and tank[1] has plenty of fuel in it. 

I can't work out WHY this is happening, but I CAN produce a slightly
modified version of fuel.nas which works, and does not modify a
configuration property. I deduced from the foregoing, but could be well
wrong, that the fault lies in the nasal coding. Perhaps my version is
corrupt somehow? Changing one line fixes it, but there are a couple of other
consequential changes to make sure that it all works safely. There might be
a bug in nasal, that would be the logical conclusion, but that is beyond my
competence.  



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread Matthew Law
Vivian Meazza wrote:
I think I would expect an engine running out of fuel to rapidly lose power
and wind down, not stop abruptly as it would if you opened the magneto
switches. I have to say that is based on motor racing rather than aviation
experience. Haven't tried it while airborne, and intend to avoid it if at
all possible.
A nice-to-have anyway, although I think I could fix it if we agree that we
want to go down that route. Very definitely low on the list of priorities.
Slightly higher would be the suggestion that out-of-fuel should not be
terminal though, since pilot error can end up with a full tank not connected
to the engine. In real life - reconnect - problem solved (or nearly). So far
as I can see that is not an option in our sim. 

If it were implmented, may be some of the code could be used for a 
carb-ice scenario?  Where application of carb heat would hopefully bring 
the engine back up to full power again.  This is a feature that I would 
love to see working well in FG - especially when the conditions are ripe 
for carb ice (which sadly, is most of the year in the UK).  Would this 
need to be done seperately for each FDM/engine combo?


All the best,
Matthew.
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-26 Thread David Megginson
Vivian Meazza wrote:
I think I would expect an engine running out of fuel to rapidly lose power
and wind down, not stop abruptly as it would if you opened the magneto
switches. I have to say that is based on motor racing rather than aviation
experience. Haven't tried it while airborne, and intend to avoid it if at
all possible.
I don't intend to try it either.  The propeller should keep windmilling, of 
course, but I don't see how the cylinders would fire once the fuel supply 
was cut off.  Even if there's still a trickle for a few seconds, the mixture 
would probably be too lean to ignite.  Perhaps there would be some surging 
and roughness, as pockets of fuel separated by air fed into various cylinders.

Slightly higher would be the suggestion that out-of-fuel should not be
terminal though, since pilot error can end up with a full tank not connected
to the engine. In real life - reconnect - problem solved (or nearly). So far
as I can see that is not an option in our sim. 
That's not an uncommon occurrence on low-wing planes, from what I hear: when 
Cessna pilots rent low-wing planes, you sometimes get forced landings with 
one tank full and one empty (that happened in Toronto Harbour last fall, 
with no injuries, fortunately).

All the best,
David
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Tried the Spitfire

2004-07-25 Thread Andy Ross
Vivian Meazza wrote:
 I'm just working on the fuel gauge for the Spitfire, when I
 ralised that I haven't modeled the fuel system correctly. At
 present both tanks feed into the engine. What should happen is
 that the upper tank feeds the lower tank which feeds the
 engine. Is there any built-in way of doing this?

One way to do this is to always make sure the lower tank is
selected, and the uper one is not.  Then have a Nasal timer fire
at some sane frequency (mayby 5Hz) or whatnot that takes fuel out
of the top tank and adds it to the bottom one according to the
current pump configuration.

It's not hard, really.  You can look at the existing fuel.nas
code for examples.  The only gotcha I can think of is that the
frame rate isn't constant: you want to use the time-elapsed
property to calculate the amount of fuel to transfer, instead of
assuming a constant amount per iteration.

Andy


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Tried the Spitfire

2004-07-25 Thread Vivian Meazza



Andy Ross wrote
 Sent: 25 July 2004 21:07
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 Vivian Meazza wrote:
  I'm just working on the fuel gauge for the Spitfire, when I
  ralised that I haven't modeled the fuel system correctly. At
  present both tanks feed into the engine. What should happen is
  that the upper tank feeds the lower tank which feeds the
  engine. Is there any built-in way of doing this?
 
 One way to do this is to always make sure the lower tank is
 selected, and the uper one is not.  Then have a Nasal timer fire
 at some sane frequency (mayby 5Hz) or whatnot that takes fuel out
 of the top tank and adds it to the bottom one according to the
 current pump configuration.
 
 It's not hard, really.  You can look at the existing fuel.nas
 code for examples.  The only gotcha I can think of is that the
 frame rate isn't constant: you want to use the time-elapsed
 property to calculate the amount of fuel to transfer, instead of
 assuming a constant amount per iteration.
 

Thanks Andy. I have already put together a Nasal script, using fuel.nas as a
model. It wasn't hard, once I had figured out how to make it re-iterate.
Nasal is a delight to use: doing exactly what we want. 

The script tries to model the fuel system. Both tanks are connected to the
engine, and there is an open pipe connecting them, so fuel is transferred
from the upper to the lower whenever there is room in the latter until the
former is empty. So good so far - that bit works. The gotcha is that the
engine stops when either tank is empty, rather than when there is no fuel in
any tank. I can't see a way around that without tinkering with the logic of
fuel.nas. That said, the logic of fuel does seem a little odd. Have I got my
analysis of the logic wrong? Where is kill-when-empty set? I can easily
adjust fuel.nas to work for the Spitfire, but of course I don't want to rot
up any other model. How to proceed?

Thanks again.


Regards,

Vivian
 http://mail.flightgear.org/mailman/listinfo/flightgear-devel



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Tried the Spitfire

2004-07-24 Thread Vivian Meazza


Vivian Meazza wrote:

 Sent: 23 July 2004 20:15
 To: 'FlightGear developers discussions'
 Subject: RE: [Flightgear-devel] Tried the Spitfire
 
 
 
 Jim Wilson wrote:
 
 
  Sent: 23 July 2004 16:01
  To: [EMAIL PROTECTED]
  Subject: [Flightgear-devel] Tried the Spitfire
 
  Very nice!  Ok if I borrow the pilot dude for the p51 cockpit?
 
 Please do - but note that he's wearing RAF blue serge trousers (pants :-
 )),
 and 1940's pattern life jacket (vest) and the wrong flying helmet/goggles.
 I
 expect some smarty pants will notice. I'm going to animate him shortly.
 
  Now, should it come up running like the other A/C?  My personal
 preference
  is
  to not, but I think in the past folks have prefered aircraft already
  started.
 
 Tough one, because when I get the propeller sorted there should be the
 possibility that the aircraft will nose over if started on full throttle.
 
  FWIW (after release) I think a preset e.g. --auto-start that defaulted
  to
  true, and was overridden as true automatically for mid air starts, but
  otherwise could be set false by the user so aircraft never come up
 running
  on
  the ground would be nice.  Along this line it should be possible to have
  aircraft running after reset as well if --auto-start was enabled.
 
 I like it - it's the way that Flight2 does it. Personally, I like to start
 with the engine shut down. It forces pre-start checks, and makes the whole
 thing more realistic. I was also following the example of the Bo105.
 

I'm just working on the fuel gauge for the Spitfire, when I ralised that I
haven't modeled the fuel system correctly. At present both tanks feed into
the engine. What should happen is that the upper tank feeds the lower tank
which feeds the engine. Is there any built-in way of doing this?

Advice would be most welcome, otherwise I guess it's some fairly complex
NASAL?

Regards,

Vivian



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Tried the Spitfire

2004-07-24 Thread Vivian Meazza


Ampere K. Hardraade wrote:

 Sent: 24 July 2004 18:58
 To: FlightGear developers discussions
 Subject: Re: [Flightgear-devel] Tried the Spitfire
 
 Can't you make it so that the engine feeds off the upper tank before it
 feeds
 on the lower tank?
 
 Regards,
 Ampere
 
 On July 24, 2004 01:42 pm, Vivian Meazza wrote:
  I'm just working on the fuel gauge for the Spitfire, when I ralised that
 I
  haven't modeled the fuel system correctly. At present both tanks feed
 into
  the engine. What should happen is that the upper tank feeds the lower
 tank
  which feeds the engine. Is there any built-in way of doing this?
 
  Advice would be most welcome, otherwise I guess it's some fairly complex
  NASAL?
 
  Regards,
 
  Vivian
 

That is of course equivalent, and might well be the way to implement it in
practice. How?

Regards,

Vivian



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Tried the Spitfire

2004-07-23 Thread Vivian Meazza


Jim Wilson wrote:


 Sent: 23 July 2004 16:01
 To: [EMAIL PROTECTED]
 Subject: [Flightgear-devel] Tried the Spitfire
 
 Very nice!  Ok if I borrow the pilot dude for the p51 cockpit?

Please do - but note that he's wearing RAF blue serge trousers (pants :-)),
and 1940's pattern life jacket (vest) and the wrong flying helmet/goggles. I
expect some smarty pants will notice. I'm going to animate him shortly.

 Now, should it come up running like the other A/C?  My personal preference
 is
 to not, but I think in the past folks have prefered aircraft already
 started.

Tough one, because when I get the propeller sorted there should be the
possibility that the aircraft will nose over if started on full throttle.  

 FWIW (after release) I think a preset e.g. --auto-start that defaulted
 to
 true, and was overridden as true automatically for mid air starts, but
 otherwise could be set false by the user so aircraft never come up running
 on
 the ground would be nice.  Along this line it should be possible to have
 aircraft running after reset as well if --auto-start was enabled.

I like it - it's the way that Flight2 does it. Personally, I like to start
with the engine shut down. It forces pre-start checks, and makes the whole
thing more realistic. I was also following the example of the Bo105.

Regards,

Vivian





___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel