| 1 | /* |
| 2 | * SPDX-License-Identifier: CC0-1.0 |
| 3 | * |
| 4 | * slip_skid_ball.hxx - an slip-skid ball. |
| 5 | * Written by David Megginson, started 2003. |
| 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 | #include <simgear/structure/subsystem_mgr.hxx> |
| 18 | |
| 19 | |
| 20 | /** |
| 21 | * Model a slip-skid ball. |
| 22 | * |
| 23 | * Input properties: |
| 24 | * |
| 25 | * /instrumentation/"name"/serviceable |
| 26 | * /accelerations/pilot/y-accel-fps_sec |
| 27 | * /accelerations/pilot/z-accel-fps_sec |
| 28 | * |
| 29 | * Output properties: |
| 30 | * |
| 31 | * /instrumentation/"name"/indicated-slip-skid |
| 32 | */ |
| 33 | class SlipSkidBall : public SGSubsystem |
| 34 | { |
| 35 | public: |
| 36 | SlipSkidBall ( SGPropertyNode *node ); |
| 37 | virtual ~SlipSkidBall (); |
| 38 | |
| 39 | // Subsystem API. |
| 40 | void init() override; |
| 41 | void reinit() override; |
| 42 | void update(double dt) override; |
| 43 | |
| 44 | // Subsystem identification. |
| 45 | static const char* staticSubsystemClassId() { return "slip-skid-ball"; } |
| 46 | |
| 47 | private: |
| 48 | std::string _name; |
| 49 | int _num; |
| 50 | |
| 51 | SGPropertyNode_ptr _serviceable_node; |
| 52 | SGPropertyNode_ptr _y_accel_node; |
| 53 | SGPropertyNode_ptr _z_accel_node; |
| 54 | SGPropertyNode_ptr _out_node; |
| 55 | SGPropertyNode_ptr _override_node; |
| 56 | }; |