FlightGear next
vertical_speed_indicator.hxx
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: CC0-1.0
3 *
4 * vertical_speed_indicator.hxx - a regular VSI tied to the static port.
5 * Written by David Megginson, started 2002.
6 *
7 * Last change by E. van den Berg, 17.02.1013
8 *
9 * This file is in the Public Domain and comes with no warranty.
10 *
11*/
12
13
14#pragma once
15
16#ifndef __cplusplus
17# error This library requires C++
18#endif
19
20#include <simgear/props/props.hxx>
21#include <simgear/structure/subsystem_mgr.hxx>
22
23
38class VerticalSpeedIndicator : public SGSubsystem
39{
40public:
41 VerticalSpeedIndicator ( SGPropertyNode *node );
42 virtual ~VerticalSpeedIndicator ();
43
44 // Subsystem API.
45 void init() override;
46 void reinit() override;
47 void update(double dt) override;
48
49 // Subsystem identification.
50 static const char* staticSubsystemClassId() { return "vertical-speed-indicator"; }
51
52private:
53 double _casing_pressure_Pa = 0.0;
54 double _casing_airmass_kg = 0.0;
55 double _casing_density_kgpm3 = 0.0;
56 double _orifice_massflow_kgps = 0.0;
57
58 const std::string _name;
59 const int _num;
60 std::string _static_pressure;
61 std::string _static_temperature;
62
63 SGPropertyNode_ptr _serviceable_node;
64 SGPropertyNode_ptr _pressure_node;
65 SGPropertyNode_ptr _temperature_node;
66 SGPropertyNode_ptr _speed_fpm_node;
67 SGPropertyNode_ptr _speed_mps_node;
68 SGPropertyNode_ptr _speed_kts_node;
69};
VerticalSpeedIndicator(SGPropertyNode *node)
void update(double dt) override
static const char * staticSubsystemClassId()