1 // vacuum.cxx - a vacuum pump connected to the aircraft engine.
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>
10 VacuumSystem::VacuumSystem ()
14 VacuumSystem::~VacuumSystem ()
21 // TODO: allow index of pump and engine
23 _serviceable_node = fgGetNode("/systems/vacuum[0]/serviceable", true);
24 _rpm_node = fgGetNode("/engines/engine[0]/rpm", true);
25 _pressure_node = fgGetNode("/environment/pressure-inhg", true);
26 _suction_node = fgGetNode("/systems/vacuum[0]/suction-inhg", true);
35 VacuumSystem::unbind ()
40 VacuumSystem::update (double dt)
42 // Model taken from steam.cxx
46 if (!_serviceable_node->getBoolValue()) {
49 double rpm = _rpm_node->getDoubleValue();
50 double pressure = _pressure_node->getDoubleValue();
51 suction = pressure * rpm / (rpm + 10000.0);
55 _suction_node->setDoubleValue(suction);