本文整理汇总了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);
}
示例2:
bool
AbstractContest::IsFinishAltitudeValid(const TracePoint& start,
const TracePoint& finish) const
{
return finish.GetIntegerAltitude() + (int)finish_alt_diff >=
start.GetIntegerAltitude();
}
示例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);
}
示例4: Invalid
gcc_const
static TracePoint Invalid() {
TracePoint point;
point.Clear();
((SearchPoint &)point).SetInvalid();
return point;
}
示例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;
};
示例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";
}
示例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);
}
示例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);
}
示例9: GetMinimumFinishAltitude
gcc_pure
int GetMinimumFinishAltitude(const TracePoint &start) const {
return start.GetIntegerAltitude() - finish_alt_diff;
}
示例10: GetMaximumStartAltitude
gcc_pure
int GetMaximumStartAltitude(const TracePoint &finish) const {
return finish.GetIntegerAltitude() + finish_alt_diff;
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}
示例15: TriangleSecondLeg
TriangleSecondLeg(bool _fai, const TracePoint &_a, const TracePoint &_b)
:is_fai(_fai), a(_a), b(_b), df_1(a.flat_distance(b)) {}