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.99999956915326 consumables/fuel/tank/capacity-gal_us {DOUBLE} = 55.83333390941939 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.99999956915326 consumables/fuel/tank[1]/capacity-gal_us {DOUBLE} = 43.00000043530412 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