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


C++ TracePoint类代码示例

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


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

示例1: distance_metric

 /**
  * Calculate error distance, between last through this to next,
  * if this node is removed.  This metric provides for Douglas-Peuker
  * thinning.
  *
  * @param last Point previous in time to this node
  * @param node This node
  * @param next Point succeeding this node
  *
  * @return Distance error if this node is thinned
  */
 static unsigned distance_metric(const TracePoint& last,
                                 const TracePoint& node,
                                 const TracePoint& next) {
     const int d_this = last.flat_distance(node) + node.flat_distance(next);
     const int d_rem = last.flat_distance(next);
     return abs(d_this - d_rem);
 }
开发者ID:macsux,项目名称:XCSoar,代码行数:18,代码来源:Trace.hpp

示例2:

bool
AbstractContest::IsFinishAltitudeValid(const TracePoint& start,
                                       const TracePoint& finish) const
{
    return finish.GetIntegerAltitude() + (int)finish_alt_diff >=
           start.GetIntegerAltitude();
}
开发者ID:kwtskran,项目名称:XCSoar,代码行数:7,代码来源:AbstractContest.cpp

示例3: DistanceMetric

 /**
  * Calculate error distance, between last through this to next,
  * if this node is removed.  This metric provides for Douglas-Peuker
  * thinning.
  *
  * @param last Point previous in time to this node
  * @param node This node
  * @param next Point succeeding this node
  *
  * @return Distance error if this node is thinned
  */
 static unsigned DistanceMetric(const TracePoint &last,
                                const TracePoint &node,
                                const TracePoint &next) {
   const int d_this = last.FlatDistanceTo(node) + node.FlatDistanceTo(next);
   const int d_rem = last.FlatDistanceTo(next);
   return abs(d_this - d_rem);
 }
开发者ID:StefanL74,项目名称:XCSoar,代码行数:18,代码来源:Trace.hpp

示例4: Invalid

 gcc_const
 static TracePoint Invalid() {
   TracePoint point;
   point.Clear();
   ((SearchPoint &)point).SetInvalid();
   return point;
 }
开发者ID:ThomasXBMC,项目名称:XCSoar,代码行数:7,代码来源:Point.hpp

示例5: operator

 /**
  * Retrieve coordinate value from object given coordinate index
  * @param d WaypointEnvelope object
  * @param k index of coordinate
  *
  * @return Coordinate value
  */
 int operator() ( const TracePoint &d, const unsigned k) const {
   switch(k) {
   case 0:
     return d.get_flatLocation().Longitude;
   case 1:
     return d.get_flatLocation().Latitude;
   };
   return 0; 
 };
开发者ID:galippi,项目名称:xcsoar,代码行数:16,代码来源:TracePoint.hpp

示例6: PrintTracePoint

static void
PrintTracePoint(const TracePoint &point, std::ofstream& fs)
{
  fs << point.GetTime()
     << " " << point.GetLocation().longitude
     << " " << point.GetLocation().latitude
     << " " << point.GetAltitude()
     << " " << point.GetVario()
     << "\n";
}
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:10,代码来源:Printing.cpp

示例7: TraceDelta

 TraceDelta(const TracePoint &p_last, const TracePoint &p,
            const TracePoint &p_next)
     :point(p),
      elim_time(time_metric(p_last, p, p_next)),
      elim_distance(distance_metric(p_last, p, p_next)),
      delta_distance(p.flat_distance(p_last))
 {
     assert(elim_distance != null_delta);
 }
开发者ID:macsux,项目名称:XCSoar,代码行数:9,代码来源:Trace.hpp

示例8: TraceDelta

 TraceDelta(const TracePoint &p_last, const TracePoint &p,
            const TracePoint &p_next)
   :point(p),
    elim_time(TimeMetric(p_last, p, p_next)),
    elim_distance(DistanceMetric(p_last, p, p_next)),
    delta_distance(p.FlatDistanceTo(p_last))
 {
   assert(elim_distance != null_delta);
 }
开发者ID:StefanL74,项目名称:XCSoar,代码行数:9,代码来源:Trace.hpp

示例9: GetMinimumFinishAltitude

 gcc_pure
 int GetMinimumFinishAltitude(const TracePoint &start) const {
   return start.GetIntegerAltitude() - finish_alt_diff;
 }
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:4,代码来源:AbstractContest.hpp

示例10: GetMaximumStartAltitude

 gcc_pure
 int GetMaximumStartAltitude(const TracePoint &finish) const {
   return finish.GetIntegerAltitude() + finish_alt_diff;
 }
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:4,代码来源:AbstractContest.hpp

示例11: update

 void update(const TracePoint &p_last, const TracePoint &p_next) {
     elim_time = time_metric(p_last, point, p_next);
     elim_distance = distance_metric(p_last, point, p_next);
     delta_distance = point.flat_distance(p_last);
 }
开发者ID:macsux,项目名称:XCSoar,代码行数:5,代码来源:Trace.hpp

示例12: approx_sq_dist

 /** 
  * Calculate approximate squared (flat projected) distance between this point
  * and another
  * 
  * @param tp Point to calculate distance to
  * 
  * @return Approximate squared distance
  */
 gcc_pure
 unsigned approx_sq_dist(const TracePoint& tp) const {
   return dsqr(get_flatLocation().Longitude-tp.get_flatLocation().Longitude)+
     dsqr(get_flatLocation().Latitude-tp.get_flatLocation().Latitude);
 }
开发者ID:galippi,项目名称:xcsoar,代码行数:13,代码来源:TracePoint.hpp

示例13: TimeMetric

 /**
  * Calculate error time, between last through this to next,
  * if this node is removed.  This metric provides for fair thinning
  * (tendency to to result in equal time steps)
  *
  * @param last Point previous in time to this node
  * @param node This node
  * @param next Point succeeding this node
  *
  * @return Time delta if this node is thinned
  */
 static unsigned TimeMetric(const TracePoint &last, const TracePoint &node,
                            const TracePoint &next) {
   return next.DeltaTime(last)
     - std::min(next.DeltaTime(node), node.DeltaTime(last));
 }
开发者ID:StefanL74,项目名称:XCSoar,代码行数:16,代码来源:Trace.hpp

示例14: Update

 void Update(const TracePoint &p_last, const TracePoint &p_next) {
   elim_time = TimeMetric(p_last, point, p_next);
   elim_distance = DistanceMetric(p_last, point, p_next);
   delta_distance = point.FlatDistanceTo(p_last);
 }
开发者ID:StefanL74,项目名称:XCSoar,代码行数:5,代码来源:Trace.hpp

示例15: TriangleSecondLeg

 TriangleSecondLeg(bool _fai, const TracePoint &_a, const TracePoint &_b)
   :is_fai(_fai), a(_a), b(_b), df_1(a.flat_distance(b)) {}
开发者ID:macsux,项目名称:XCSoar,代码行数:2,代码来源:OLCTriangle.cpp


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