2002-09-28 20:48:53 +00:00
|
|
|
// pitot.hxx - the pitot air system.
|
|
|
|
// Written by David Megginson, started 2002.
|
|
|
|
//
|
|
|
|
// This file is in the Public Domain and comes with no warranty.
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __SYSTEMS_PITOT_HXX
|
|
|
|
#define __SYSTEMS_PITOT_HXX 1
|
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
# error This library requires C++
|
|
|
|
#endif
|
|
|
|
|
2004-10-16 12:37:39 +00:00
|
|
|
#include <simgear/compiler.h>
|
|
|
|
|
|
|
|
#include STL_STRING
|
|
|
|
SG_USING_STD(string);
|
|
|
|
|
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-28 20:48:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Model a pitot air system.
|
|
|
|
*
|
|
|
|
* The output is the sum of static and dynamic pressure (not just the
|
|
|
|
* dynamic pressure).
|
|
|
|
*
|
|
|
|
* Input properties:
|
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* /systems/"name"/serviceable
|
2002-09-28 20:48:53 +00:00
|
|
|
* /environment/pressure-slugft3
|
|
|
|
* /environment/density-slugft3
|
2002-10-16 22:09:26 +00:00
|
|
|
* /velocities/airspeed-kt
|
2002-09-28 20:48:53 +00:00
|
|
|
*
|
|
|
|
* Output properties:
|
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* /systems/"name"/total-pressure-inhg
|
2002-09-28 20:48:53 +00:00
|
|
|
*/
|
2003-09-24 17:20:55 +00:00
|
|
|
class PitotSystem : public SGSubsystem
|
2002-09-28 20:48:53 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2004-10-16 12:37:39 +00:00
|
|
|
PitotSystem ( SGPropertyNode *node );
|
2002-09-28 20:48:53 +00:00
|
|
|
virtual ~PitotSystem ();
|
|
|
|
|
|
|
|
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-28 20:48:53 +00:00
|
|
|
SGPropertyNode_ptr _serviceable_node;
|
|
|
|
SGPropertyNode_ptr _pressure_node;
|
|
|
|
SGPropertyNode_ptr _density_node;
|
|
|
|
SGPropertyNode_ptr _velocity_node;
|
2006-07-17 18:14:31 +00:00
|
|
|
SGPropertyNode_ptr _slip_angle;
|
2002-09-28 20:48:53 +00:00
|
|
|
SGPropertyNode_ptr _total_pressure_node;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __SYSTEMS_PITOT_HXX
|