本文整理汇总了C++中GlideResult::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ GlideResult::Reset方法的具体用法?C++ GlideResult::Reset怎么用?C++ GlideResult::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GlideResult
的用法示例。
在下文中一共展示了GlideResult::Reset方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tm
void
OrderedTask::GlideSolutionPlanned(const AircraftState &aircraft,
const GlidePolar &glide_polar,
GlideResult &total,
GlideResult &leg,
DistanceStat &total_remaining_effective,
DistanceStat &leg_remaining_effective,
const GlideResult &solution_remaining_total,
const GlideResult &solution_remaining_leg)
{
if (task_points.empty()) {
total.Reset();
leg.Reset();
total_remaining_effective.Reset();
leg_remaining_effective.Reset();
return;
}
TaskMacCreadyTotal tm(task_points.cbegin(), task_points.cend(),
active_task_point,
task_behaviour.glide, glide_polar);
total = tm.glide_solution(aircraft);
leg = tm.get_active_solution();
if (solution_remaining_total.IsOk())
total_remaining_effective.SetDistance(tm.effective_distance(solution_remaining_total.time_elapsed));
else
total_remaining_effective.Reset();
if (solution_remaining_leg.IsOk())
leg_remaining_effective.SetDistance(tm.effective_leg_distance(solution_remaining_leg.time_elapsed));
else
leg_remaining_effective.Reset();
}
示例2: tm
void
OrderedTask::GlideSolutionRemaining(const AircraftState &aircraft,
const GlidePolar &polar,
GlideResult &total,
GlideResult &leg)
{
if (!aircraft.location.IsValid()) {
total.Reset();
leg.Reset();
return;
}
TaskMacCreadyRemaining tm(task_points.cbegin(), task_points.cend(),
active_task_point,
task_behaviour.glide, polar);
total = tm.glide_solution(aircraft);
leg = tm.get_active_solution();
}
示例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;
}
示例5: SolveVertical
GlideResult
MacCready::SolveStraight(const GlideState &task) const
{
if (!glide_polar.IsValid()) {
/* can't solve without a valid GlidePolar() */
GlideResult result;
result.Reset();
return result;
}
if (task.vector.distance <= 0)
return SolveVertical(task);
if (glide_polar.GetMC() <= 0)
// whole task must be glide
return OptimiseGlide(task);
return SolveGlide(task, glide_polar.GetVBestLD());
}
示例6: Alternate
Alternate(const Waypoint &_waypoint)
:waypoint(_waypoint)
{
solution.Reset();
}