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


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

本文整理汇总了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";
}
开发者ID:macsux,项目名称:XCSoar,代码行数:27,代码来源:test_mc.cpp

示例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";
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:30,代码来源:test_mc.cpp

示例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;
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例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;
}
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:19,代码来源:UnorderedTask.cpp


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