2002-09-27 18:27:58 +00:00
|
|
|
// altimeter.hxx - an altimeter tied to the static port.
|
|
|
|
// Written by David Megginson, started 2002.
|
|
|
|
//
|
|
|
|
// This file is in the Public Domain and comes with no warranty.
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __INSTRUMENTS_ALTIMETER_HXX
|
|
|
|
#define __INSTRUMENTS_ALTIMETER_HXX 1
|
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
# error This library requires C++
|
|
|
|
#endif
|
|
|
|
|
2003-05-06 23:46:24 +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
|
|
|
|
|
|
|
|
|
|
|
class SGInterpTable;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Model a barometric altimeter tied to the static port.
|
|
|
|
*
|
|
|
|
* Input properties:
|
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* /instrumentation/"name"/serviceable
|
|
|
|
* /instrumentation/"name"/setting-inhg
|
|
|
|
* "static_port"/pressure-inhg
|
2002-09-27 18:27:58 +00:00
|
|
|
*
|
|
|
|
* Output properties:
|
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* /instrumentation/"name"/indicated-altitude-ft
|
2002-09-27 18:27:58 +00:00
|
|
|
*/
|
2003-09-24 17:20:55 +00:00
|
|
|
class Altimeter : public SGSubsystem
|
2002-09-27 18:27:58 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2004-10-16 12:37:39 +00:00
|
|
|
Altimeter (SGPropertyNode *node);
|
2002-09-27 18:27:58 +00:00
|
|
|
Altimeter ();
|
|
|
|
virtual ~Altimeter ();
|
|
|
|
|
|
|
|
virtual void init ();
|
|
|
|
virtual void update (double dt);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2004-10-16 12:37:39 +00:00
|
|
|
string name;
|
|
|
|
int num;
|
|
|
|
string static_port;
|
|
|
|
|
2002-09-27 18:27:58 +00:00
|
|
|
SGPropertyNode_ptr _serviceable_node;
|
|
|
|
SGPropertyNode_ptr _setting_node;
|
|
|
|
SGPropertyNode_ptr _pressure_node;
|
|
|
|
SGPropertyNode_ptr _altitude_node;
|
|
|
|
|
|
|
|
SGInterpTable * _altitude_table;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __INSTRUMENTS_ALTIMETER_HXX
|