X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FSystems%2Fvacuum.hxx;h=c9507c81648f5dc5aab82e80a4d24ada3f33e94e;hb=9c63b7713307eb4db9f6df7959fe83977f561c42;hp=a18036c77b2ffaa76b30c60a70795d6ec22c1fa8;hpb=980012e1682fdb27c9b9ec27edea0b549d603f9d;p=flightgear.git diff --git a/src/Systems/vacuum.hxx b/src/Systems/vacuum.hxx index a18036c77..c9507c816 100644 --- a/src/Systems/vacuum.hxx +++ b/src/Systems/vacuum.hxx @@ -11,6 +11,7 @@ # error This library requires C++ #endif +#include #include #include @@ -18,36 +19,43 @@ /** * Model a vacuum-pump system. * - * This first, simple draft is hard-wired to engine #1. + * Multiple pumps (i.e. for a multiengine aircraft) can be specified. * * Input properties: * - * /engines/engine[0]/rpm + * "rpm1" + * "rpm2" + * "..." * /environment/pressure-inhg - * /systems/vacuum[0]/serviceable + * /systems/"name"/serviceable * * Output properties: * - * /systems/vacuum[n]/suction-inhg + * /systems/"name"/suction-inhg */ class VacuumSystem : public SGSubsystem { public: + VacuumSystem( SGPropertyNode *node ); VacuumSystem( int i ); virtual ~VacuumSystem (); virtual void init (); + virtual void reinit (); virtual void bind (); virtual void unbind (); virtual void update (double dt); private: - int num; + std::string _name; + int _num; + string_list _rpms; + double _scale; SGPropertyNode_ptr _serviceable_node; - SGPropertyNode_ptr _rpm_node; + std::vector _rpm_nodes; SGPropertyNode_ptr _pressure_node; SGPropertyNode_ptr _suction_node;