|
From: Bertrand C. <bco...@gm...> - 2011-02-06 12:32:32
|
2011/1/30 Bertrand Coconnier <bco...@gm...>: > 2011/1/29 Ron Jensen <wi...@je...>: >> >> + double fuelDensity = Propulsion->GetTank(i)->GetDensity(); >> >> ( ... ) >> >> + Propulsion->GetTank(i)->GetContents() / fuelDensity); >> >> >> Should we guard against GetDensity() returning 0? > > Correct. > > Please find an updated version of the patch that uses the standard > fuel density (6.0 lbs/gal) if the density is too low or negative ( < > 0.1). This is assuming that if the density goes below that threshold > it can only be an error. Another policy would be to clamp the value to > 0.1. > > Suggestions ? > > Also, unlike the existing code base, this patch is assuming that the > fuel weight is the reference and that the fuel volume should be > adjusted to the fuel density modifications. When the fuel temperature > drops, its volume decreases but its weight is not changing. I would > think that this does not break backward compatibility : the > fuel/payload menu is checking the fuel volume against the tank > capacity and is reacting well to density modifications in the property > tree. But I would like to have other opinions. > > This version 3 of the patches supersedes the other two. > Hi FG developers, Since no further comments have been made, is there any chance to see this patch committed in Flight Gear ? In case you would have additional comments or questions before committing, I am of course open to answer them Cheers, Bertrand. |