FlightGear next
heading_indicator.hxx
Go to the documentation of this file.
1/*
2 * SPDX-FileName: heading_indicator.hxx
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 * SPDX-FileContributor: Written by David Megginson, started 2002.
5 */
6
7#pragma once
8
9
10#include <simgear/props/props.hxx>
11#include <simgear/structure/subsystem_mgr.hxx>
12
13#include "gyro.hxx"
14
15
31class HeadingIndicator : public SGSubsystem
32{
33public:
34 HeadingIndicator ( SGPropertyNode *node );
36 virtual ~HeadingIndicator ();
37
38 // Subsystem API.
39 void bind() override;
40 void init() override;
41 void reinit() override;
42 void unbind() override;
43 void update(double dt) override;
44
45 // Subsystem identification.
46 static const char* staticSubsystemClassId() { return "heading-indicator"; }
47
48private:
49 Gyro _gyro;
50 double _last_heading_deg;
51
52 std::string _name;
53 int _num;
54 std::string _suction;
55
56 SGPropertyNode_ptr _offset_node;
57 SGPropertyNode_ptr _heading_in_node;
58 SGPropertyNode_ptr _suction_node;
59 SGPropertyNode_ptr _heading_out_node;
60 SGPropertyNode_ptr _heading_bug_error_node;
61 SGPropertyNode_ptr _heading_bug_node;
62};
Simple model of a spinning gyro.
Definition gyro.hxx:12
void reinit() override
void bind() override
void update(double dt) override
HeadingIndicator(SGPropertyNode *node)
static const char * staticSubsystemClassId()
void unbind() override
void init() override