From: Hal V. E. <hv...@gm...> - 2011-02-06 21:40:32
|
On Sunday, February 06, 2011 01:13:28 PM Torsten Dreyer wrote: > > I have checked your code and it breaks the previous behaviour for > > JSBSim. Your code is overwriting JSBSim values during initialization, > > I would rather do it the other way around and make JSBSim overwrite > > FlightGear default values. Especially because the capacity of all the > > tanks is now set to zero instead of using the FDM model definition. > > > > Enclosed is a patch that restores the normal behaviour : fuel > > capacity, level and density are set after the values defined in the > > aircraft JSBSim XML definition. > > Ouch - that was my bad. I only initialized JSBSim properties from > FlightGear properties which didn't work if tanks are only defined within > the JSBSim config file. > Your patch turns this the other way round. I tried to combine both versions > and set JSBSim properties from FlightGear properties if they exist and > create the FlightGear properties from JSBSim properties if not. > > Looks good for me with the p51d-jsbsim, the c172p and the SenecaII. > > Thanks for the fast bug-report and the solution! > > Torsten Did you test the P-51D drop tanks to make sure these work OK? The unusual thing it does is to prevent the drop tank contents from being non-zero unless the tank is currently in place. This is to prevent the pilot from using the Equipment --> Fuel and Payload menu to put fuel into a non-existant drop tank. This should be tested just to make sure it is still working. Hal |