当前位置: 首页>>代码示例>>C++>>正文


C++ GlideResult::IsAchievable方法代码示例

本文整理汇总了C++中GlideResult::IsAchievable方法的典型用法代码示例。如果您正苦于以下问题:C++ GlideResult::IsAchievable方法的具体用法?C++ GlideResult::IsAchievable怎么用?C++ GlideResult::IsAchievable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GlideResult的用法示例。


在下文中一共展示了GlideResult::IsAchievable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

gcc_pure
static bool
IsReachable(const GlideResult &result, bool final_glide)
{
  return final_glide
    ? result.IsFinalGlide()
    : result.IsAchievable();
}
开发者ID:FlorianR,项目名称:XCSoar,代码行数:8,代码来源:AbortTask.cpp

示例2:

static void
SetValueFromAltDiff(InfoBoxData &data, const TaskStats &task_stats,
                    const GlideResult &solution)
{
  if (!task_stats.task_valid || !solution.IsAchievable()) {
    data.SetInvalid();
    return;
  }

  const ComputerSettings &settings = CommonInterface::GetComputerSettings();
  fixed altitude_difference =
    solution.SelectAltitudeDifference(settings.task.glide);
  data.SetValueFromArrival(altitude_difference);
}
开发者ID:Adrien81,项目名称:XCSoar,代码行数:14,代码来源:Task.cpp

示例3:

void
InfoBoxContentNextAltitudeArrival::Update(InfoBoxData &data)
{
  // pilots want this to be assuming terminal flight to this wp

  const MoreData &basic = CommonInterface::Basic();
  const TaskStats &task_stats = XCSoarInterface::Calculated().task_stats;
  const GlideResult next_solution = XCSoarInterface::Calculated().common_stats.next_solution;
  if (!task_stats.task_valid || !next_solution.IsAchievable()) {
    data.SetInvalid();
    return;
  }

  data.SetValueFromAltitude(next_solution.GetArrivalAltitude(basic.nav_altitude));
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:15,代码来源:Task.cpp

示例4: AirspaceAircraftPerformance

 /**
  * Specialisation of AirspaceAircraftPerformance for tasks where
  * part of the path is in cruise, part in final glide.  This is
  * intended to be used temporarily only.
  *
  * This simplifies the path by assuming flight is constant altitude
  * or descent to the task point elevation.
  */
 AirspaceAircraftPerformance(const GlidePolar &polar,
                             const GlideResult &solution)
   :vertical_tolerance(0.001),
    cruise_speed(positive(solution.time_elapsed)
                 ? solution.vector.distance / solution.time_elapsed
                 : fixed(1)),
    cruise_descent(positive(solution.time_elapsed)
                   ? (positive(solution.height_climb)
                      ? -solution.height_climb
                      : solution.height_glide) / solution.time_elapsed
                   : fixed(0)),
    descent_rate(polar.GetSBestLD()),
    climb_rate(positive(solution.time_elapsed) &&
               positive(solution.height_climb)
               ? polar.GetMC()
               : fixed(0)),
    max_speed(cruise_speed) {
   assert(polar.IsValid());
   assert(solution.IsOk());
   assert(solution.IsAchievable());
 }
开发者ID:DRIZO,项目名称:xcsoar,代码行数:29,代码来源:AirspaceAircraftPerformance.hpp

示例5: IsAchievable

 /**
  * Determine whether the task (or subtask) is able to be finished
  * (will fail if MC too low, wind too high etc)
  *
  * @return True if can finish the task
  */
 bool IsAchievable() const {
   return solution_remaining.IsAchievable();
 }
开发者ID:damianob,项目名称:xcsoar,代码行数:9,代码来源:ElementStat.hpp


注:本文中的GlideResult::IsAchievable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。