1
0
Fork 0

YASim: FGFDM convert local variable _yasimN into a class member

This commit is contained in:
Henning Stahlke 2017-02-08 23:49:56 +01:00
parent 2cac4e4671
commit 70dd3de3bb
2 changed files with 7 additions and 5 deletions

View file

@ -121,15 +121,15 @@ void FGFDM::init()
_turb_magnitude_norm = fgGetNode("/environment/turbulence/magnitude-norm", true); _turb_magnitude_norm = fgGetNode("/environment/turbulence/magnitude-norm", true);
_turb_rate_hz = fgGetNode("/environment/turbulence/rate-hz", true); _turb_rate_hz = fgGetNode("/environment/turbulence/rate-hz", true);
SGPropertyNode_ptr yasimNode = fgGetNode("/fdm/yasim", true); _yasimN = fgGetNode("/fdm/yasim", true);
_gross_weight_lbs = yasimNode->getNode("gross-weight-lbs", true); _gross_weight_lbs = _yasimN->getNode("gross-weight-lbs", true);
// alias to older name // alias to older name
fgGetNode("/yasim/gross-weight-lbs", true)->alias(_gross_weight_lbs); fgGetNode("/yasim/gross-weight-lbs", true)->alias(_gross_weight_lbs);
_cg_x = yasimNode->getNode("cg-x-m", true); _cg_x = _yasimN->getNode("cg-x-m", true);
_cg_y = yasimNode->getNode("cg-y-m", true); _cg_y = _yasimN->getNode("cg-y-m", true);
_cg_z = yasimNode->getNode("cg-z-m", true); _cg_z = _yasimN->getNode("cg-z-m", true);
// Allows the user to start with something other than full fuel // Allows the user to start with something other than full fuel
_airplane.setFuelFraction(fgGetFloat("/sim/fuel-fraction", 1)); _airplane.setFuelFraction(fgGetFloat("/sim/fuel-fraction", 1));

View file

@ -101,6 +101,8 @@ private:
SGPropertyNode_ptr _cg_x; SGPropertyNode_ptr _cg_x;
SGPropertyNode_ptr _cg_y; SGPropertyNode_ptr _cg_y;
SGPropertyNode_ptr _cg_z; SGPropertyNode_ptr _cg_z;
SGPropertyNode_ptr _yasimN;
std::vector<SGPropertyNode_ptr> _tank_level_lbs; std::vector<SGPropertyNode_ptr> _tank_level_lbs;
std::vector<ThrusterProps> _thrust_props; std::vector<ThrusterProps> _thrust_props;
std::vector<FuelProps> _fuel_props; std::vector<FuelProps> _fuel_props;