2119db35c3
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.
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
// vertical_speed_indicator.hxx - a regular VSI 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_VERTICAL_SPEED_INDICATOR_HXX
|
|
#define __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_HXX 1
|
|
|
|
#ifndef __cplusplus
|
|
# error This library requires C++
|
|
#endif
|
|
|
|
#include <simgear/props/props.hxx>
|
|
|
|
#include <Main/fgfs.hxx>
|
|
|
|
|
|
/**
|
|
* Model a non-instantaneous VSI tied to the static port.
|
|
*
|
|
* Input properties:
|
|
*
|
|
* /instrumentation/vertical-speed-indicator/serviceable
|
|
* /systems/static[0]/pressure-inhg
|
|
*
|
|
* Output properties:
|
|
*
|
|
* /instrumentation/vertical-speed-indicator/indicated-speed-fpm
|
|
*/
|
|
class VerticalSpeedIndicator : public FGSubsystem
|
|
{
|
|
|
|
public:
|
|
|
|
VerticalSpeedIndicator ();
|
|
virtual ~VerticalSpeedIndicator ();
|
|
|
|
virtual void init ();
|
|
virtual void update (double dt);
|
|
|
|
private:
|
|
|
|
double _internal_pressure_inhg;
|
|
|
|
SGPropertyNode_ptr _serviceable_node;
|
|
SGPropertyNode_ptr _pressure_node;
|
|
SGPropertyNode_ptr _speed_node;
|
|
|
|
};
|
|
|
|
#endif // __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_HXX
|