|
From: Erik H. <eh...@us...> - 2015-10-26 11:50:46
|
Update of /cvsroot/jsbsim/JSBSim/utils/aeromatic++/Systems In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11863/Systems Modified Files: LandingGear.cpp Propulsion.cpp Propulsion.h Thruster.h Log Message: MSVC fixes Index: LandingGear.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/Systems/LandingGear.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** LandingGear.cpp 22 Oct 2015 12:22:24 -0000 1.7 --- LandingGear.cpp 26 Oct 2015 11:50:41 -0000 1.8 *************** *** 63,76 **** if (_taildragger) { ! _gear_loc[MAIN][X] = cg_loc[X] * 0.91; ! _gear_loc[MAIN][Z] = -(_aircraft->_length * 0.20) * FEET_TO_INCH; } else { ! _gear_loc[MAIN][X] = cg_loc[X] * 1.04; ! _gear_loc[MAIN][Z] = -(_aircraft->_length * 0.12) * FEET_TO_INCH; } if (glider) { ! _gear_loc[MAIN][Z] = -(_aircraft->_length / 10) * FEET_TO_INCH; } --- 63,76 ---- if (_taildragger) { ! _gear_loc[MAIN][X] = cg_loc[X] * 0.91f; ! _gear_loc[MAIN][Z] = -(_aircraft->_length * 0.20f) * FEET_TO_INCH; } else { ! _gear_loc[MAIN][X] = cg_loc[X] * 1.04f; ! _gear_loc[MAIN][Z] = -(_aircraft->_length * 0.12f) * FEET_TO_INCH; } if (glider) { ! _gear_loc[MAIN][Z] = -(_aircraft->_length / 10.0f) * FEET_TO_INCH; } *************** *** 79,106 **** // set nose gear location ! _gear_loc[NOSE][X] = _aircraft->_length * 0.13 * FEET_TO_INCH; _gear_loc[NOSE][Y] = 0; _gear_loc[NOSE][Z] = _gear_loc[MAIN][Z]; if (glider) { ! _gear_loc[NOSE][Z] *= 0.6; } // set tail gear location ! _gear_loc[TAIL][X] = _aircraft->_length * 0.91 * FEET_TO_INCH; _gear_loc[TAIL][Y] = 0; ! _gear_loc[TAIL][Z] = _gear_loc[MAIN][Z] * 0.30; // set spring and damp coefficients ! _gear_spring[MAIN] = _aircraft->_max_weight * 1.0; ! _gear_spring[NOSE] = _aircraft->_max_weight * 0.3; ! _gear_spring[TAIL] = _aircraft->_max_weight * 1.0; ! ! _gear_damp[MAIN] = _aircraft->_max_weight * 0.5; ! _gear_damp[NOSE] = _aircraft->_max_weight * 0.15; ! _gear_damp[TAIL] = _aircraft->_max_weight * 0.5; ! ! _gear_static = 0.8; ! _gear_dynamic = 0.5; ! _gear_rolling = (glider) ? 0.5 : 0.02; _gear_max_steer = 5.0f; --- 79,106 ---- // set nose gear location ! _gear_loc[NOSE][X] = _aircraft->_length * 0.13f * FEET_TO_INCH; _gear_loc[NOSE][Y] = 0; _gear_loc[NOSE][Z] = _gear_loc[MAIN][Z]; if (glider) { ! _gear_loc[NOSE][Z] *= 0.6f; } // set tail gear location ! _gear_loc[TAIL][X] = _aircraft->_length * 0.91f * FEET_TO_INCH; _gear_loc[TAIL][Y] = 0; ! _gear_loc[TAIL][Z] = _gear_loc[MAIN][Z] * 0.30f; // set spring and damp coefficients ! _gear_spring[MAIN] = _aircraft->_max_weight * 1.0f; ! _gear_spring[NOSE] = _aircraft->_max_weight * 0.3f; ! _gear_spring[TAIL] = _aircraft->_max_weight * 1.0f; ! ! _gear_damp[MAIN] = _aircraft->_max_weight * 0.5f; ! _gear_damp[NOSE] = _aircraft->_max_weight * 0.15f; ! _gear_damp[TAIL] = _aircraft->_max_weight * 0.5f; ! ! _gear_static = 0.8f; ! _gear_dynamic = 0.5f; ! _gear_rolling = (glider) ? 0.5f : 0.02f; _gear_max_steer = 5.0f; Index: Propulsion.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/Systems/Propulsion.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** Propulsion.cpp 25 Oct 2015 10:35:37 -0000 1.19 --- Propulsion.cpp 26 Oct 2015 11:50:41 -0000 1.20 *************** *** 36,40 **** { ! Propulsion::Propulsion(Aeromatic *p) : Engine(p, this), _layout(FWD_FUSELAGE) { --- 36,40 ---- { ! Propulsion::Propulsion(Aeromatic *p) : Engine(p, 0), _layout(FWD_FUSELAGE) { *************** *** 67,70 **** --- 67,72 ---- _propulsion[4] = new ElectricEngine(p, this); type->add_option(_propulsion[4]->get_description()); + + Engine::_propulsion = this; } *************** *** 413,418 **** { _description.push_back("Piston Engine"); ! _inputs.push_back(new Param("Engine Power", 0, _power, _aircraft->_metric, POWER)); ! _inputs.push_back(new Param("Maximum Engine RPM", 0, _max_rpm)); _thruster = new Propeller(this); } --- 415,420 ---- { _description.push_back("Piston Engine"); ! _inputs.push_back(new Param("Engine power", 0, _power, _aircraft->_metric, POWER)); ! _inputs.push_back(new Param("Maximum engine rpm", 0, _max_rpm)); _thruster = new Propeller(this); } *************** *** 476,479 **** --- 478,482 ---- // http://web.mit.edu/16.unified/www/SPRING/propulsion/UnifiedPropulsion3/UnifiedPropulsion3.htm TurbineEngine::TurbineEngine(Aeromatic *a, Propulsion *p) : Engine(a, p), + _oapr(16.0f), _bypass_ratio(1.0f), _injected(false), *************** *** 481,488 **** { _description.push_back("Turbine Engine"); ! _inputs.push_back(new Param("Engine Thrust", 0, _power, _aircraft->_metric, THRUST)); _inputs.push_back(new Param("Bypass ratio", 0, _bypass_ratio)); _inputs.push_back(new Param("Augmented?", 0, _augmented)); ! _inputs.push_back(new Param("water injection?", 0, _injected)); _thruster = new Direct(this); } --- 484,492 ---- { _description.push_back("Turbine Engine"); ! _inputs.push_back(new Param("Engine thrust", 0, _power, _aircraft->_metric, THRUST)); _inputs.push_back(new Param("Bypass ratio", 0, _bypass_ratio)); + _inputs.push_back(new Param("Overall pressure ratio", Aeromatic::_estimate, _oapr)); _inputs.push_back(new Param("Augmented?", 0, _augmented)); ! _inputs.push_back(new Param("Water injection?", 0, _injected)); _thruster = new Direct(this); } *************** *** 499,503 **** // Figure 3.10 ! float tsfc = 0.7533f - 0.0941f * logf(_bypass_ratio); file.precision(2); --- 503,507 ---- // Figure 3.10 ! float tsfc = 0.7533f - 0.161f * log10f(0.0625f * _oapr * _bypass_ratio); file.precision(2); *************** *** 517,520 **** --- 521,527 ---- file << " augmented? " << (_augmented ? "yes" : "no") << std::endl; file << " injected? " << (_injected ? "yes" : "no") << std::endl; + file << std::endl; + file << " Outputs" << std::endl; + file << " tsfc " << tsfc << std::endl; file << "-->" << std::endl; file <<std::endl; *************** *** 626,640 **** TurbopropEngine::TurbopropEngine(Aeromatic *a, Propulsion *p) : Engine(a, p), ! _max_rpm(2700.0f), ! _oapr(15.0f), _itt(800.0f), - _psfc(0.66f), _water_injection(false) { _description.push_back("Turboprop Engine"); ! _inputs.push_back(new Param("Engine Power", 0, _power, _aircraft->_metric, POWER)); ! _inputs.push_back(new Param("Maximum Engine RPM", 0, _max_rpm)); _inputs.push_back(new Param("Overall pressure ratio", Aeromatic::_estimate, _oapr)); ! _inputs.push_back(new Param("Turbine Inlet Temperature", "in degrees Celcius", _itt)); _thruster = new Propeller(this); } --- 633,646 ---- TurbopropEngine::TurbopropEngine(Aeromatic *a, Propulsion *p) : Engine(a, p), ! _max_rpm(23500.0f), ! _oapr(16.0f), _itt(800.0f), _water_injection(false) { _description.push_back("Turboprop Engine"); ! _inputs.push_back(new Param("Engine power", 0, _power, _aircraft->_metric, POWER)); ! _inputs.push_back(new Param("Maximum engine rpm", 0, _max_rpm)); _inputs.push_back(new Param("Overall pressure ratio", Aeromatic::_estimate, _oapr)); ! _inputs.push_back(new Param("Turbine inlet temperature", "in degrees Celcius", _itt)); _thruster = new Propeller(this); } *************** *** 688,691 **** --- 694,703 ---- file << " inlet temperature: " << _itt << " degrees C"<< std::endl; file << " overall pressure ratio: " << _oapr << ":1" << std::endl; + file << std::endl; + file << " Outputs:" << std::endl; + file << " psfc: " << std::setprecision(3) << psfc << std::setprecision(1) << " lbs/hr/hp" << std::endl; + file << " engine mass: " << (0.246f * _power * KG_TO_LBS) << " lbs" << std::endl; + file << " engine length: " << (0.1068f * powf(_power, 0.4094f) * METER_TO_FEET) << " ft" << std::endl; + file << " engine diameter: " << (0.1159f * powf(_power, 0.2483f) * METER_TO_FEET) << " ft" <<std::endl; file << "-->" << std::endl; file <<std::endl; *************** *** 775,779 **** { _description.push_back("Rocket Engine"); ! _inputs.push_back(new Param("Engine Thrust", 0, _power, _aircraft->_metric, THRUST)); |