1 // static.cxx - the static air system.
2 // Written by David Megginson, started 2002.
4 // This file is in the Public Domain and comes with no warranty.
7 #include <Main/fg_props.hxx>
8 #include <Main/util.hxx>
11 StaticSystem::StaticSystem ()
15 StaticSystem::~StaticSystem ()
22 _serviceable_node = fgGetNode("/systems/static[0]/serviceable", true);
23 _pressure_in_node = fgGetNode("/environment/pressure-inhg", true);
24 _pressure_out_node = fgGetNode("/systems/static[0]/pressure-inhg", true);
33 StaticSystem::unbind ()
38 StaticSystem::update (double dt)
40 if (_serviceable_node->getBoolValue()) {
42 double target = _pressure_in_node->getDoubleValue();
43 double current = _pressure_out_node->getDoubleValue();
44 double delta = target - current;
45 _pressure_out_node->setDoubleValue(fgGetLowPass(current, target, dt));