From 70dd3de3bb1d07907e3242bd3607986f61f10884 Mon Sep 17 00:00:00 2001 From: Henning Stahlke Date: Wed, 8 Feb 2017 23:49:56 +0100 Subject: [PATCH] YASim: FGFDM convert local variable _yasimN into a class member --- src/FDM/YASim/FGFDM.cpp | 10 +++++----- src/FDM/YASim/FGFDM.hpp | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/FDM/YASim/FGFDM.cpp b/src/FDM/YASim/FGFDM.cpp index 659cfe550..a86b764da 100644 --- a/src/FDM/YASim/FGFDM.cpp +++ b/src/FDM/YASim/FGFDM.cpp @@ -121,15 +121,15 @@ void FGFDM::init() _turb_magnitude_norm = fgGetNode("/environment/turbulence/magnitude-norm", true); _turb_rate_hz = fgGetNode("/environment/turbulence/rate-hz", true); - SGPropertyNode_ptr yasimNode = fgGetNode("/fdm/yasim", true); - _gross_weight_lbs = yasimNode->getNode("gross-weight-lbs", true); + _yasimN = fgGetNode("/fdm/yasim", true); + _gross_weight_lbs = _yasimN->getNode("gross-weight-lbs", true); // alias to older name fgGetNode("/yasim/gross-weight-lbs", true)->alias(_gross_weight_lbs); - _cg_x = yasimNode->getNode("cg-x-m", true); - _cg_y = yasimNode->getNode("cg-y-m", true); - _cg_z = yasimNode->getNode("cg-z-m", true); + _cg_x = _yasimN->getNode("cg-x-m", true); + _cg_y = _yasimN->getNode("cg-y-m", true); + _cg_z = _yasimN->getNode("cg-z-m", true); // Allows the user to start with something other than full fuel _airplane.setFuelFraction(fgGetFloat("/sim/fuel-fraction", 1)); diff --git a/src/FDM/YASim/FGFDM.hpp b/src/FDM/YASim/FGFDM.hpp index 0b7c48daa..4461d26af 100644 --- a/src/FDM/YASim/FGFDM.hpp +++ b/src/FDM/YASim/FGFDM.hpp @@ -101,6 +101,8 @@ private: SGPropertyNode_ptr _cg_x; SGPropertyNode_ptr _cg_y; SGPropertyNode_ptr _cg_z; + SGPropertyNode_ptr _yasimN; + std::vector _tank_level_lbs; std::vector _thrust_props; std::vector _fuel_props;