Example #1
0
  void visit_abstract(const AbstractAirspace &as) {
    assert(!m_intersections.empty());

    GeoPoint point = m_intersections[0].first;

    RouteLink l = rpolar.generate_intermediate(link.first,
                                               RoutePoint(proj.project(point), link.second.altitude),
                                               proj);

    if ((l.second.altitude< (short)as.get_base().Altitude) ||
        (l.second.altitude> (short)as.get_top().Altitude))
      return;

    if (negative(min_distance) || (l.d < min_distance)) {
      min_distance = l.d;
      nearest = std::make_pair(&as, l.second);
    }
  }
Example #2
0
bool
AirspacePredicateHeightRange::check_height(const AbstractAirspace& t) const
{
  return (int)t.get_top().Altitude >= h_min &&
    (int)t.get_base().Altitude <= h_max;
}