X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Faltimeter.cxx;h=8e9fbb1c95897cc72fde13ef4f5e2d9cf80f9796;hb=43b300fe46d8013a90009ec8e1a923ec53a396b5;hp=56516da2c647adf0d84e128e083e0d10b5a47a6b;hpb=7e6bc192bad98454187ffe2b5521d28fe6b722a4;p=flightgear.git diff --git a/src/Instrumentation/altimeter.cxx b/src/Instrumentation/altimeter.cxx index 56516da2c..8e9fbb1c9 100644 --- a/src/Instrumentation/altimeter.cxx +++ b/src/Instrumentation/altimeter.cxx @@ -15,7 +15,12 @@ // // Note non-default name, quantum, and tau values. +#ifdef HAVE_CONFIG_H +# include +#endif + #include +#include #include
#include
@@ -63,10 +68,10 @@ Altimeter::update (double dt) 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)); + _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);