From 4a5961ca5b4d978a1749bbf1ca50d48562993624 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 10 Nov 2003 21:57:14 +0000 Subject: [PATCH] Allow the slip/skid ball to be overridden by an external source which calculates the position instead. --- src/Instrumentation/slip_skid_ball.cxx | 4 +++- src/Instrumentation/slip_skid_ball.hxx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Instrumentation/slip_skid_ball.cxx b/src/Instrumentation/slip_skid_ball.cxx index 3d2c8c475..9ebff9ba7 100644 --- a/src/Instrumentation/slip_skid_ball.cxx +++ b/src/Instrumentation/slip_skid_ball.cxx @@ -25,12 +25,14 @@ SlipSkidBall::init () _z_accel_node = fgGetNode("/accelerations/pilot/z-accel-fps_sec", true); _out_node = fgGetNode("/instrumentation/slip-skid-ball/indicated-slip-skid", true); + _override_node = + fgGetNode("/instrumentation/slip-skid-ball/override", true); } void SlipSkidBall::update (double delta_time_sec) { - if (_serviceable_node->getBoolValue()) { + if (_serviceable_node->getBoolValue() && !_override_node->getBoolValue()) { double d = -_z_accel_node->getDoubleValue(); if (d < 1.0) d = 1.0; diff --git a/src/Instrumentation/slip_skid_ball.hxx b/src/Instrumentation/slip_skid_ball.hxx index d8ed245c0..4c11c1df5 100644 --- a/src/Instrumentation/slip_skid_ball.hxx +++ b/src/Instrumentation/slip_skid_ball.hxx @@ -50,7 +50,8 @@ private: SGPropertyNode_ptr _y_accel_node; SGPropertyNode_ptr _z_accel_node; SGPropertyNode_ptr _out_node; - + SGPropertyNode_ptr _override_node; + }; #endif // __INSTRUMENTS_SLIP_SKID_BALL_HXX