2002-09-27 18:27:58 +00:00
|
|
|
// static.hxx - the static air system.
|
|
|
|
// Written by David Megginson, started 2002.
|
|
|
|
//
|
|
|
|
// This file is in the Public Domain and comes with no warranty.
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __SYSTEMS_STATIC_HXX
|
|
|
|
#define __SYSTEMS_STATIC_HXX 1
|
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
# error This library requires C++
|
|
|
|
#endif
|
|
|
|
|
2003-05-06 23:54:17 +00:00
|
|
|
#include <simgear/props/props.hxx>
|
2003-09-24 17:20:55 +00:00
|
|
|
#include <simgear/structure/subsystem_mgr.hxx>
|
2002-09-27 18:27:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Model a static air system.
|
|
|
|
*
|
|
|
|
* Input properties:
|
|
|
|
*
|
|
|
|
* /environment/pressure-inhg
|
2004-10-16 12:37:39 +00:00
|
|
|
* /systems/"name"/serviceable
|
2002-09-27 18:27:58 +00:00
|
|
|
*
|
|
|
|
* Output properties:
|
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* /systems/"name"/pressure-inhg
|
2002-09-27 18:27:58 +00:00
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* TODO: support specific locations
|
2002-09-27 18:27:58 +00:00
|
|
|
* TODO: support alternate air with errors
|
|
|
|
*/
|
2003-09-24 17:20:55 +00:00
|
|
|
class StaticSystem : public SGSubsystem
|
2002-09-27 18:27:58 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2004-10-16 12:37:39 +00:00
|
|
|
StaticSystem ( SGPropertyNode *node );
|
|
|
|
StaticSystem ( int i );
|
2002-09-27 18:27:58 +00:00
|
|
|
virtual ~StaticSystem ();
|
|
|
|
|
|
|
|
virtual void init ();
|
|
|
|
virtual void bind ();
|
|
|
|
virtual void unbind ();
|
|
|
|
virtual void update (double dt);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2006-12-06 22:11:43 +00:00
|
|
|
string _name;
|
|
|
|
int _num;
|
2002-09-27 18:27:58 +00:00
|
|
|
SGPropertyNode_ptr _serviceable_node;
|
|
|
|
SGPropertyNode_ptr _pressure_in_node;
|
|
|
|
SGPropertyNode_ptr _pressure_out_node;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __SYSTEMS_STATIC_HXX
|