FlightGear next
heading_indicator_fg.hxx
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: CC0-1.0
3 *
4 * heading_indicator_fg.hxx - an electrically-powered fluxgate compass.
5 * Written by David Megginson, started 2002.
6 *
7 * This file is in the Public Domain and comes with no warranty.
8*/
9
10#pragma once
11
12#ifndef __cplusplus
13# error This library requires C++
14#endif
15
16#include <simgear/props/props.hxx>
17
19
20#include "gyro.hxx"
21
22
39{
40public:
41 HeadingIndicatorFG ( SGPropertyNode *node );
43 virtual ~HeadingIndicatorFG ();
44
45 // Subsystem API.
46 //void bind() override;
47 void init() override;
48 void reinit() override;
49 //void unbind() override;
50 void update(double dt) override;
51
52 // Subsystem identification.
53 static const char* staticSubsystemClassId() { return "heading-indicator-fg"; }
54
55private:
56 Gyro _gyro;
57 double _last_heading_deg;
58
59 SGPropertyNode_ptr _offset_node;
60 SGPropertyNode_ptr _heading_in_node;
61 SGPropertyNode_ptr _serviceable_node;
62 SGPropertyNode_ptr _heading_out_node;
63 SGPropertyNode_ptr _electrical_node;
64 SGPropertyNode_ptr _error_node;
65 SGPropertyNode_ptr _nav1_error_node;
66 SGPropertyNode_ptr _off_node;
67 SGPropertyNode_ptr _spin_node;
68};
Simple model of a spinning gyro.
Definition gyro.hxx:12
void update(double dt) override
HeadingIndicatorFG(SGPropertyNode *node)
static const char * staticSubsystemClassId()