# error This library requires C++
#endif
-#include <simgear/misc/props.hxx>
-#include <Main/fgfs.hxx>
+#include <simgear/math/sg_types.hxx>
+#include <simgear/props/props.hxx>
+#include <simgear/structure/subsystem_mgr.hxx>
/**
* 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[0]/suction-inhg
+ * /systems/"name"/suction-inhg
*/
-class VacuumSystem : public FGSubsystem
+class VacuumSystem : public SGSubsystem
{
public:
- VacuumSystem ();
+ 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:
+ std::string _name;
+ int _num;
+ string_list _rpms;
+ double _scale;
SGPropertyNode_ptr _serviceable_node;
- SGPropertyNode_ptr _rpm_node;
+ std::vector<SGPropertyNode_ptr> _rpm_nodes;
SGPropertyNode_ptr _pressure_node;
SGPropertyNode_ptr _suction_node;