1
0
Fork 0
flightgear/src/Systems/pitot.hxx
curt 198b88ca9b This is step "1" of probably "many" in the process of separating out the
scene management code and organizing it within simgear.  My strategy is
to identify the code I want to move, and break it's direct flightgear
dependencies.  Then it will be free to move over into the simgear package.

- Moved some property specific code into simgear/props/
- Split out the condition code from fgfs/src/Main/fg_props and put it
  in it's own source file in simgear/props/
- Created a scene subdirectory for scenery, model, and material property
  related code.
- Moved location.[ch]xx into simgear/scene/model/
- The location and condition code had dependencies on flightgear's global
  state (all the globals-> stuff, the flightgear property tree, etc.)  SimGear
  code can't depend on it so that data has to be passed as parameters to the
  functions/methods/constructors.
- This need to pass data as function parameters had a dramatic cascading
  effect throughout the FlightGear code.
2003-05-06 23:54:17 +00:00

59 lines
1.1 KiB
C++

// 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
#include <simgear/props/props.hxx>
#include <Main/fgfs.hxx>
/**
* Model a pitot air system.
*
* The output is the sum of static and dynamic pressure (not just the
* dynamic pressure).
*
* Input properties:
*
* /systems/pitot[0]/serviceable
* /environment/pressure-slugft3
* /environment/density-slugft3
* /velocities/airspeed-kt
*
* Output properties:
*
* /systems/pitot[0]/total-pressure-inhg
*/
class PitotSystem : public FGSubsystem
{
public:
PitotSystem ();
virtual ~PitotSystem ();
virtual void init ();
virtual void bind ();
virtual void unbind ();
virtual void update (double dt);
private:
SGPropertyNode_ptr _serviceable_node;
SGPropertyNode_ptr _pressure_node;
SGPropertyNode_ptr _density_node;
SGPropertyNode_ptr _velocity_node;
SGPropertyNode_ptr _total_pressure_node;
};
#endif // __SYSTEMS_PITOT_HXX