From: Erik H. <eh...@us...> - 2016-11-24 09:59:37
|
Update of /cvsroot/jsbsim/JSBSim/utils/aeromatic++ In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv318 Modified Files: Aircraft.cpp version Log Message: Set the unit of wing_incidence to DEG, Fix the naming of wing root chord and always add fcs/gear-no-wow Index: Aircraft.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/Aircraft.cpp,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -r1.76 -r1.77 *** Aircraft.cpp 3 Sep 2016 09:45:56 -0000 1.76 --- Aircraft.cpp 24 Nov 2016 09:59:34 -0000 1.77 *************** *** 148,152 **** _geometry.push_back(new Param("Wing aspect ratio", _estimate, _wing.aspect)); _geometry.push_back(new Param("Wing taper ratio", _estimate, _wing.taper)); ! _geometry.push_back(new Param("Wing mean chord", _estimate, _wing.chord_mean, _metric, LENGTH)); _geometry.push_back(new Param("Wing incidence", _estimate, _wing.incidence)); _geometry.push_back(new Param("Wing dihedral", _estimate, _wing.dihedral)); --- 148,152 ---- _geometry.push_back(new Param("Wing aspect ratio", _estimate, _wing.aspect)); _geometry.push_back(new Param("Wing taper ratio", _estimate, _wing.taper)); ! _geometry.push_back(new Param("Wing root chord", _estimate, _wing.chord_mean, _metric, LENGTH)); _geometry.push_back(new Param("Wing incidence", _estimate, _wing.incidence)); _geometry.push_back(new Param("Wing dihedral", _estimate, _wing.dihedral)); *************** *** 272,275 **** --- 272,276 ---- { float TR = _wing.taper; + _wing.chord_mean = 2.0f*_wing.chord_mean*(1.0f+TR-(TR/(1.0f+TR)))/3.0f; _user_wing_data++; *************** *** 422,437 **** } - //***** CG LOCATION *********************************** - - _cg_loc[X] = (_length - _htail.arm) * FEET_TO_INCH; - _cg_loc[Y] = 0; - _cg_loc[Z] = -(_length / 40.0f) * FEET_TO_INCH; - - //***** AERO REFERENCE POINT ************************** - - _aero_rp[X] = _cg_loc[X]; - _aero_rp[Y] = 0; - _aero_rp[Z] = 0; - //***** PILOT EYEPOINT ********************************* --- 423,426 ---- *************** *** 443,446 **** --- 432,460 ---- eyept_loc[Z] = _eyept_loc[Z]; + //***** AERO REFERENCE POINT ************************** + + _aero_rp[X] = (_length - _htail.arm) * FEET_TO_INCH; + _aero_rp[Y] = 0; + _aero_rp[Z] = 0; + + //***** CG LOCATION *********************************** + #if 0 + // http://www.rcgroups.com/forums/showatt.php?attachmentid=1651636 + float TR = _wing.taper; + float Sw = _wing.area; + float cbar = _wing.chord_mean; + float Sh = _htail.area; + float L = _htail.arm; + + float R = 3.0f*cbar/(2.0f*(1.0f+TR-(TR/(1.0f+TR)))); + float T = R * TR; + float P = L*Sh/(3.0f*Sw) - ((R*R + R*T + T*T)/(R+T))/15.0f; + _cg_loc[X] = _aero_rp[X] + P * FEET_TO_INCH; + #else + _cg_loc[X] = _aero_rp[X]; + #endif + _cg_loc[Y] = 0; + _cg_loc[Z] = -(_length / 40.0f) * FEET_TO_INCH; + //***** PAYLOAD *************************************** *************** *** 602,606 **** file << " <wingarea unit=\"FT2\"> " << std::setw(8) << _wing.area << " </wingarea>" << std::endl; file << " <wingspan unit=\"FT\" > " << std::setw(8) << _wing.span << " </wingspan>" << std::endl; ! file << " <wing_incidence> " << std::setw(8) << _wing.incidence << " </wing_incidence>" << std::endl; file << " <chord unit=\"FT\" > " << std::setw(8) << _wing.chord_mean << " </chord>" << std::endl; file << " <htailarea unit=\"FT2\"> " << std::setw(8) << _htail.area << " </htailarea>" << std::endl; --- 616,620 ---- file << " <wingarea unit=\"FT2\"> " << std::setw(8) << _wing.area << " </wingarea>" << std::endl; file << " <wingspan unit=\"FT\" > " << std::setw(8) << _wing.span << " </wingspan>" << std::endl; ! file << " <wing_incidence unit=\"DEG\"> " << std::setw(2) << _wing.incidence << " </wing_incidence>" << std::endl; file << " <chord unit=\"FT\" > " << std::setw(8) << _wing.chord_mean << " </chord>" << std::endl; file << " <htailarea unit=\"FT2\"> " << std::setw(8) << _htail.area << " </htailarea>" << std::endl; Index: version =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/version,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** version 3 Sep 2016 09:45:56 -0000 1.22 --- version 24 Nov 2016 09:59:34 -0000 1.23 *************** *** 1 **** ! 3.3.8 --- 1 ---- ! 3.3.9 |