bool AATPoint::close_to_target(const AIRCRAFT_STATE& state, const fixed threshold) const { if (!valid()) return false; return (double_leg_distance(m_target_location)-double_leg_distance(state.Location) <= threshold); }
bool AATPoint::check_target_inside(const AIRCRAFT_STATE& state) { // target must be moved if d(p_last,t)+d(t,p_next) // < d(p_last,state)+d(state,p_next) if (close_to_target(state)) { if (positive(double_leg_distance(state.Location) -double_leg_distance(get_location_max()))) { // no improvement available return false; } else { m_target_location = state.Location; return true; } } else { return false; } }