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


C++ AATPoint::get_location_target方法代码示例

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


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

示例1: ell

AATIsoline::AATIsoline(const AATPoint& ap, const TaskProjection &projection):
  ell(ap.get_previous()->get_location_remaining(),
      ap.get_next()->get_location_remaining(),
      ap.get_location_target(),
      projection)
{
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:7,代码来源:AATIsoline.cpp

示例2: seg

void 
PrintHelper::aatpoint_print(std::ostream& f, 
                            const AATPoint& tp,
                            const AircraftState& state,
                            const TaskProjection &projection,
                            const int item) 
{
  switch(item) {
  case 0:
    orderedtaskpoint_print(f, tp, state, item);
    f << "#   Target " << tp.m_target_location.longitude << ","
      << tp.m_target_location.latitude << "\n";
    break;

  case 1:

    if (tp.valid() && (tp.getActiveState() != OrderedTaskPoint::BEFORE_ACTIVE)) {
      assert(tp.get_previous());
      assert(tp.get_next());
      // note in general this will only change if 
      // prev max or target changes

      AATIsolineSegment seg(tp, projection);
      fixed tdist = tp.get_previous()->GetLocationRemaining().Distance(
        tp.GetLocationMin());
      fixed rdist = tp.get_previous()->GetLocationRemaining().Distance(
        tp.get_location_target());

      bool filter_backtrack = true;
      if (seg.IsValid()) {
        for (double t = 0.0; t<=1.0; t+= 1.0/20) {
          GeoPoint ga = seg.Parametric(fixed(t));
          fixed dthis = tp.get_previous()->GetLocationRemaining().Distance(ga);
          if (!filter_backtrack 
              || (dthis>=tdist)
              || (dthis>=rdist)) {
            /// @todo unless double dist is better than current
            f << ga.longitude << " " << ga.latitude << "\n";
          }
        }
      } else {
        GeoPoint ga = seg.Parametric(fixed_zero);
        f << ga.longitude << " " << ga.latitude << "\n";
      }
      f << "\n";

    }
    break;
  }
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:50,代码来源:TaskPrinting.cpp


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