X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Faltimeter.cxx;h=0f8d5fc2c7a1ab184c0f790eccf3205c78b0e754;hb=3a11f8ae2843c1f3629f4168e5b10c3993c7bd3e;hp=f5d6229d5e7a942c6b8a41d4e6d24fa4afc34da6;hpb=b395c12fdb68662638bc638d339fb8fcbbaee778;p=flightgear.git diff --git a/src/Instrumentation/altimeter.cxx b/src/Instrumentation/altimeter.cxx index f5d6229d5..0f8d5fc2c 100644 --- a/src/Instrumentation/altimeter.cxx +++ b/src/Instrumentation/altimeter.cxx @@ -15,6 +15,10 @@ // // Note non-default name, quantum, and tau values. +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include @@ -43,6 +47,7 @@ Altimeter::init () SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true ); raw_PA = 0.0; + _kollsman = 0.0; _pressure_node = fgGetNode(_static_pressure.c_str(), true); _serviceable_node = node->getChild("serviceable", 0, true); _setting_node = node->getChild("setting-inhg", 0, true); @@ -67,7 +72,7 @@ Altimeter::update (double dt) _mode_c_node->setDoubleValue(100 * SGMiscd::round(raw_PA/100)); _kollsman = fgGetLowPass(_kollsman, _altimeter.kollsman_ft(setting), trat); if (_quantum) - press_alt = _quantum*round(raw_PA/_quantum); + press_alt = _quantum * SGMiscd::round(raw_PA/_quantum); else press_alt = raw_PA; _press_alt_node->setDoubleValue(press_alt);