FlightGear next
attitude_indicator_electric.hxx
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: CC0-1.0
3 *
4 *
5 * Written by David Megginson, started 2002.
6 *
7 * Last Edited by Benedikt Wolf 2023 - ported to electrically-powered
8 *
9 * This file is in the Public Domain and comes with no warranty.
10*/
11
12#pragma once
13
14#ifndef __cplusplus
15# error This library requires C++
16#endif
17
19
20#include "gyro.hxx"
21
22
48{
49public:
50 AttitudeIndicatorElectric ( SGPropertyNode *node );
52
53 // Subsystem API.
54 void init() override;
55 void reinit() override;
56 void update(double dt) override;
57
58 // Subsystem identification.
59 static const char* staticSubsystemClassId() { return "attitude-indicator-electric"; }
60
61private:
62 Gyro _gyro;
63 double _gyro_spin_up, _gyro_spin_down;
64
65 SGPropertyNode_ptr _tumble_flag_node;
66 SGPropertyNode_ptr _caged_node;
67 SGPropertyNode_ptr _tumble_node;
68 SGPropertyNode_ptr _pitch_in_node;
69 SGPropertyNode_ptr _roll_in_node;
70 SGPropertyNode_ptr _pitch_int_node;
71 SGPropertyNode_ptr _roll_int_node;
72 SGPropertyNode_ptr _pitch_out_node;
73 SGPropertyNode_ptr _roll_out_node;
74 SGPropertyNode_ptr _off_node;
75 SGPropertyNode_ptr _spin_node, _gyro_spin_up_node, _gyro_spin_down_node;
76
77 double spin_thresh;
78 double max_roll_error;
79 double max_pitch_error;
80};
AttitudeIndicatorElectric(SGPropertyNode *node)
Simple model of a spinning gyro.
Definition gyro.hxx:12