本文整理汇总了C++中Aircraft::get_wing_loading方法的典型用法代码示例。如果您正苦于以下问题:C++ Aircraft::get_wing_loading方法的具体用法?C++ Aircraft::get_wing_loading怎么用?C++ Aircraft::get_wing_loading使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aircraft
的用法示例。
在下文中一共展示了Aircraft::get_wing_loading方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fdm
bool Aeromatic::fdm()
{
Aircraft *aircraft = _aircraft[_atype];
std::vector<System*> systems = _aircraft[_atype]->get_systems();
_engines = _MIN(_no_engines, 4);
aircraft->_engines = _engines;
//***** METRICS ***************************************
_payload = _max_weight;
_stall_weight = _max_weight;
// first, estimate wing loading in psf
float wing_loading = aircraft->get_wing_loading();
// if no wing area given, use wing loading to estimate
bool wingarea_input;
if (_wing.area == 0)
{
wingarea_input = false;
_wing.area = _max_weight / wing_loading;
}
else
{
wingarea_input = true;
wing_loading = _max_weight / _wing.area;
}
// calculate wing chord
if (_wing.aspect == 0) {
_wing.aspect = aircraft->get_aspect_ratio();
} else {
_user_wing_data++;
}
if (_wing.chord == 0)
{
if (_wing.aspect > 0) {
_wing.chord = _wing.span / _wing.aspect;
} else {
_wing.chord = _wing.area / _wing.span;
}
}
else {
_user_wing_data++;
}
// calculate aspect ratio
if (_wing.aspect == 0) {
_wing.aspect = (_wing.span*_wing.span) / _wing.area;
} else {
_user_wing_data++;
}
if (_wing.taper == 0) {
_wing.taper = 1.0f;
}
float TR = _wing.taper;
_wing.chord_mean = 0.75f*_wing.chord*(1.0f+TR+TR*TR)/(1.0f+TR);
_wing.de_da = 4.0f/(_wing.aspect+2.0f);
// leading edge sweep
// devide the span by two and account for fuselage width
float span = 0.45f*_wing.span;
float root_tip = _wing.chord*(1.0f - _wing.taper);
if (_wing.sweep_le == 0)
{
_wing.sweep_le = atanf(root_tip/span);
if (_wing.shape != DELTA) {
_wing.sweep_le *= 0.5f;
}
_wing.sweep_le *= RAD_TO_DEG;
_wing.sweep_le += _wing.sweep;
}
if (_wing.thickness == 0)
{
// Hofman equation for t/c
// float Ws = _stall_weight;
float Vs = _stall_speed * KNOTS_TO_FPS;
float sweep = _wing.sweep * DEG_TO_RAD;
float TC = 0.051f * _wing.area * powf(cosf(sweep), 5.0f)/Vs;
_wing.thickness = TC * _wing.chord;
}
// for now let's use a standard 2 degrees wing incidence
if (_wing.incidence == 0) {
_wing.incidence = 2.0;
}
// estimate horizontal tail area
if (_htail.area == 0) {
_htail.area = _wing.area * aircraft->get_htail_area();
}
// estimate distance from CG to horizontal tail aero center
if (_htail.arm == 0) {
_htail.arm = _length * aircraft->get_htail_arm();
//.........这里部分代码省略.........