本文整理汇总了C++中GlideResult::CalcDeferred方法的典型用法代码示例。如果您正苦于以下问题:C++ GlideResult::CalcDeferred方法的具体用法?C++ GlideResult::CalcDeferred怎么用?C++ GlideResult::CalcDeferred使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GlideResult
的用法示例。
在下文中一共展示了GlideResult::CalcDeferred方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: polar
static void
test_glide_cb(const fixed h, const fixed W, const fixed Wangle,
std::ostream &hfile)
{
GlidePolar polar(fixed_one);
AircraftState ac;
ac.wind.norm = fabs(W);
if (negative(W)) {
ac.wind.bearing = Angle::degrees(fixed(180)+Wangle);
} else {
ac.wind.bearing = Angle::degrees(Wangle);
}
ac.altitude = h;
GeoVector vect(fixed(400.0));
GlideState gs (vect, fixed_zero, ac.altitude, ac.wind);
GlideResult gr = MacCready::solve(polar, gs);
gr.CalcDeferred(ac);
hfile << (double)W << " "
<< (double)Wangle << " "
<< (double)gr.vector.Bearing.value_degrees() << " "
<< (double)gr.cruise_track_bearing.value_degrees() << " "
<< "\n";
}
示例2: polar
static void
test_glide_cb(const fixed h, const fixed W, const fixed Wangle,
std::ostream &hfile)
{
GlideSettings settings;
settings.SetDefaults();
GlidePolar polar(fixed(1));
AircraftState ac;
ac.wind.norm = fabs(W);
if (negative(W)) {
ac.wind.bearing = Angle::Degrees(fixed(180)+Wangle);
} else {
ac.wind.bearing = Angle::Degrees(Wangle);
}
ac.altitude = h;
GeoVector vect(fixed(400.0), Angle::Zero());
GlideState gs (vect, fixed(0), ac.altitude, ac.wind);
GlideResult gr = MacCready::Solve(settings, polar, gs);
gr.CalcDeferred();
hfile << (double)W << " "
<< (double)Wangle << " "
<< (double)gr.vector.bearing.Degrees() << " "
<< (double)gr.cruise_track_bearing.Degrees() << " "
<< "\n";
}
示例3: GetActiveTaskPoint
void
UnorderedTask::GlideSolutionRemaining(const AircraftState &state,
const GlidePolar &polar,
GlideResult &total,
GlideResult &leg)
{
GlideResult res;
TaskPoint* tp = GetActiveTaskPoint();
if (tp) {
res = TaskSolution::GlideSolutionRemaining(*tp, state, polar);
res.CalcDeferred();
} else
res.Reset();
total = res;
leg = res;
}
示例4: GetActiveTaskPoint
void
UnorderedTask::GlideSolutionRemaining(const AircraftState &state,
const GlidePolar &polar,
GlideResult &total,
GlideResult &leg)
{
GlideResult res;
TaskPoint* tp = GetActiveTaskPoint();
if (tp != nullptr && state.location.IsValid()) {
res = TaskSolution::GlideSolutionRemaining(*tp, state,
task_behaviour.glide, polar);
res.CalcDeferred();
} else
res.Reset();
total = res;
leg = res;
}