X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fvertical_speed_indicator.cxx;h=1ad62253b61a29ffff7d6aec4b940ef5a6e44ffe;hb=a6de24461e797871d3c841f045343b05929378fb;hp=e5c9f743274e9671c0674ab52ce3a3d3de218930;hpb=5d7b9ec1f10d03a284228ce82547d06bc7e52b76;p=flightgear.git diff --git a/src/Instrumentation/vertical_speed_indicator.cxx b/src/Instrumentation/vertical_speed_indicator.cxx index e5c9f7432..1ad62253b 100644 --- a/src/Instrumentation/vertical_speed_indicator.cxx +++ b/src/Instrumentation/vertical_speed_indicator.cxx @@ -9,6 +9,7 @@ #include
#include
+using std::string; VerticalSpeedIndicator::VerticalSpeedIndicator ( SGPropertyNode *node ) : _internal_pressure_inhg(29.92), @@ -32,6 +33,7 @@ VerticalSpeedIndicator::init () _serviceable_node = node->getChild("serviceable", 0, true); _pressure_node = fgGetNode(_static_pressure.c_str(), true); _speed_node = node->getChild("indicated-speed-fpm", 0, true); + _speed_up_node = fgGetNode("/sim/speed-up", true); // Initialize at ambient pressure _internal_pressure_inhg = _pressure_node->getDoubleValue(); @@ -44,6 +46,9 @@ VerticalSpeedIndicator::update (double dt) // from 10000 to 10500 for manual factor if (_serviceable_node->getBoolValue()) { double pressure = _pressure_node->getDoubleValue(); + double speed_up = _speed_up_node->getDoubleValue(); + if( speed_up > 1 ) + dt *= speed_up; _speed_node ->setDoubleValue((_internal_pressure_inhg - pressure) * 10500); _internal_pressure_inhg =