本文整理汇总了C++中GlidePolar::GetVTakeoff方法的典型用法代码示例。如果您正苦于以下问题:C++ GlidePolar::GetVTakeoff方法的具体用法?C++ GlidePolar::GetVTakeoff怎么用?C++ GlidePolar::GetVTakeoff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GlidePolar
的用法示例。
在下文中一共展示了GlidePolar::GetVTakeoff方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
GlidePolarTest::TestBasic()
{
polar.Update();
ok1(equals(polar.polar.a, polar.ideal_polar.a));
ok1(equals(polar.polar.b, polar.ideal_polar.b));
ok1(equals(polar.polar.c, polar.ideal_polar.c));
ok1(equals(polar.SinkRate(Units::ToSysUnit(fixed(80), Unit::KILOMETER_PER_HOUR)), 0.606));
ok1(equals(polar.SinkRate(Units::ToSysUnit(fixed(120), Unit::KILOMETER_PER_HOUR)), 0.99));
ok1(equals(polar.SinkRate(Units::ToSysUnit(fixed(160), Unit::KILOMETER_PER_HOUR)), 1.918));
ok1(equals(polar.GetSMax(), polar.SinkRate(polar.GetVMax())));
ok1(equals(polar.GetVMin(), 19.934640523));
ok1(equals(polar.GetSMin(), polar.SinkRate(polar.GetVMin())));
ok1(equals(polar.GetVTakeoff(), polar.GetVMin() / 2));
ok1(equals(polar.GetVBestLD(), 25.830434162));
ok1(equals(polar.GetSBestLD(), polar.SinkRate(polar.GetVBestLD())));
ok1(equals(polar.GetBestLD(), polar.GetVBestLD() / polar.GetSBestLD()));
ok1(equals(polar.GetTotalMass(), 318));
ok1(equals(polar.GetWingLoading(), 32.448979592));
ok1(equals(polar.GetBallast(), 0));
ok1(equals(polar.GetBallastLitres(), 0));
ok1(polar.IsBallastable());
ok1(!polar.HasBallast());
}
示例2: Vector
void
WindComputer::Compute(const WindSettings &settings,
const GlidePolar &glide_polar,
const MoreData &basic, DerivedInfo &calculated)
{
if (settings.CirclingWindEnabled() &&
calculated.circling != last_circling)
circling_wind.NewFlightMode(calculated);
last_circling = calculated.circling;
if (!calculated.flight.flying)
return;
if (settings.CirclingWindEnabled() &&
calculated.turn_mode == CirclingMode::CLIMB) {
CirclingWind::Result result = circling_wind.NewSample(basic);
if (result.IsValid())
wind_store.SlotMeasurement(basic, result.wind, result.quality);
}
if (settings.ZigZagWindEnabled() &&
basic.airspeed_available && basic.airspeed_real &&
basic.true_airspeed > glide_polar.GetVTakeoff()) {
WindEKFGlue::Result result = wind_ekf.Update(basic, calculated);
if (result.quality > 0) {
Vector v_wind = Vector(result.wind);
wind_store.SlotMeasurement(basic, v_wind, result.quality);
}
}
if (settings.IsAutoWindEnabled())
wind_store.SlotAltitude(basic, calculated);
}
示例3:
void
GlideComputerAirData::FlightState(const NMEAInfo &basic,
const NMEAInfo &last_basic,
const DerivedInfo &calculated,
FlyingState &flying,
const GlidePolar &glide_polar)
{
flying_computer.Compute(glide_polar.GetVTakeoff(), basic, last_basic,
calculated, flying);
}
示例4: fixed
inline void
GlideComputerAirData::FlightState(const NMEAInfo &basic,
const DerivedInfo &calculated,
FlyingState &flying,
const GlidePolar &glide_polar)
{
fixed v_takeoff = glide_polar.IsValid()
? glide_polar.GetVTakeoff()
/* if there's no valid polar, assume 10 m/s (36 km/h); that's an
arbitrary value, but better than nothing */
: fixed(10);
flying_computer.Compute(v_takeoff, basic,
calculated, flying);
}