On Tue, 2007-02-27 at 19:07 -0700, Dave Perry wrote: Sorry,
I copied from the wrong version. I will add the missing line and delete a declaration: > Here is an obvious fix for this bug in the update code: > > void > Altimeter::update (double dt) > { > if (_serviceable_node->getBoolValue()) { > double trat = _tau > 0 ? dt/_tau : 100; > double pressure = _pressure_node->getDoubleValue(); > double setting = _setting_node->getDoubleValue(); double press_alt = _press_alt_node->getDoubleValue(); > // The mechanism settles slowly toward new pressure altitude: > raw_PA = > fgGetLowPass(raw_PA, _altimeter.press_alt_ft(pressure), trat); > _mode_c_node->setDoubleValue(100 * round(raw_PA/100)); > _kollsman = fgGetLowPass(_kollsman, > _altimeter.kollsman_ft(setting), trat); > _kollsman_offset_node->setDoubleValue(_kollsman); > if (_quantum) press_alt = _quantum*round(raw_PA/_quantum); > else press_alt = raw_PA; > _press_alt_node->setDoubleValue(press_alt); > _altitude_node->setDoubleValue(press_alt - _kollsman); > } > } > > // end of altimeter.cxx > > Of cource you need to declare > > private: > double rawPA; > SGPropertyNode_ptr _kollsman_offset_node; > > in the header file. > > Can we land this flight by trading this bug fix for leaving the > kollsman_offset_node line in the code? > > Please, lets agree and go work on some of the other more pressing > issues! > > By the way, no matter what, our interaction has had value. > > 1) I had never used c++ to any extent (numerical analysts my age use > either fortran or just c). I have learned a lot by working on the > altimeter/encoder instances. > 2). I have modified kap140.nas so that the kollsman (baro) shift is > computed or pulled from the property tree only when baro setting > changes. This is much more efficient as you have pointed out. > 3) I think I have made some contributions to your efforts in this area > as well. > > I for one want to see this much improved altimeter/encoder and > atmosphere model in cvs. I did a pros and cons analysis for the the two > likely resolutions to our disagreement which I will share if you are > really serious about putting this in cvs. The options are of course > with and without the 2 lines of code to save the kollsman shift. > > After sharing this analysis with the list, I will go with what the > community sees as the best option. > > Comments from others? > Dave P -- Dave Perry <[EMAIL PROTECTED]> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel