FlightGear next
turn_indicator.hxx
Go to the documentation of this file.
1/*
2 * SPDX-FileName: turn_indicator.hxx
3 * SPDX-FileComment: an electric-powered turn indicator.
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 * SPDX-FileContributor: Written by David Megginson, started 2002.
6 */
7
8
9#pragma once
10
12
13#include "gyro.hxx"
14
15
59{
60public:
61 TurnIndicator ( SGPropertyNode *node );
62 virtual ~TurnIndicator ();
63
64 // Subsystem API.
65 void init() override;
66 void reinit() override;
67 void update(double dt) override;
68
69 // Subsystem identification.
70 static const char* staticSubsystemClassId() { return "turn-indicator"; }
71
72private:
73 Gyro _gyro;
74 double _last_rate;
75 double _gyro_spin_up, _gyro_spin_down;
76
77 SGPropertyNode_ptr _roll_rate_node;
78 SGPropertyNode_ptr _yaw_rate_node;
79 SGPropertyNode_ptr _rate_out_node;
80 SGPropertyNode_ptr _spin_node, _gyro_spin_up_node, _gyro_spin_down_node;
81};
Simple model of a spinning gyro.
Definition gyro.hxx:12
void update(double dt) override
void reinit() override
void init() override
virtual ~TurnIndicator()
TurnIndicator(SGPropertyNode *node)
static const char * staticSubsystemClassId()