From 77a8b4db30b03cded7736f123c657873ef592a8d Mon Sep 17 00:00:00 2001 From: jmt Date: Wed, 9 Sep 2009 09:44:52 +0000 Subject: [PATCH] Add normalised heading deflection property to navradio. --- src/Instrumentation/navradio.cxx | 4 ++++ src/Instrumentation/navradio.hxx | 1 + 2 files changed, 5 insertions(+) diff --git a/src/Instrumentation/navradio.cxx b/src/Instrumentation/navradio.cxx index 5f10992e2..b99c539e0 100644 --- a/src/Instrumentation/navradio.cxx +++ b/src/Instrumentation/navradio.cxx @@ -74,6 +74,7 @@ FGNavRadio::FGNavRadio(SGPropertyNode *node) : inrange_node(NULL), signal_quality_norm_node(NULL), cdi_deflection_node(NULL), + cdi_deflection_norm_node(NULL), cdi_xtrack_error_node(NULL), cdi_xtrack_hdg_err_node(NULL), has_gs_node(NULL), @@ -182,6 +183,7 @@ FGNavRadio::init () inrange_node = node->getChild("in-range", 0, true); signal_quality_norm_node = node->getChild("signal-quality-norm", 0, true); cdi_deflection_node = node->getChild("heading-needle-deflection", 0, true); + cdi_deflection_norm_node = node->getChild("heading-needle-deflection-norm", 0, true); cdi_xtrack_error_node = node->getChild("crosstrack-error-m", 0, true); cdi_xtrack_hdg_err_node = node->getChild("crosstrack-heading-error-deg", 0, true); @@ -335,6 +337,7 @@ void FGNavRadio::clearOutputs() { inrange_node->setBoolValue( false ); cdi_deflection_node->setDoubleValue( 0.0 ); + cdi_deflection_norm_node->setDoubleValue( 0.0 ); cdi_xtrack_error_node->setDoubleValue( 0.0 ); cdi_xtrack_hdg_err_node->setDoubleValue( 0.0 ); time_to_intercept->setDoubleValue( 0.0 ); @@ -571,6 +574,7 @@ void FGNavRadio::updateCDI(double dt) } cdi_deflection_node->setDoubleValue(_cdiDeflection); + cdi_deflection_norm_node->setDoubleValue(_cdiDeflection * 0.1); cdi_xtrack_error_node->setDoubleValue(_cdiCrossTrackErrorM); ////////////////////////////////////////////////////////// diff --git a/src/Instrumentation/navradio.hxx b/src/Instrumentation/navradio.hxx index 5b64f374a..9665bc6f7 100644 --- a/src/Instrumentation/navradio.hxx +++ b/src/Instrumentation/navradio.hxx @@ -90,6 +90,7 @@ class FGNavRadio : public SGSubsystem SGPropertyNode_ptr inrange_node; SGPropertyNode_ptr signal_quality_norm_node; SGPropertyNode_ptr cdi_deflection_node; + SGPropertyNode_ptr cdi_deflection_norm_node; SGPropertyNode_ptr cdi_xtrack_error_node; SGPropertyNode_ptr cdi_xtrack_hdg_err_node; SGPropertyNode_ptr has_gs_node;