- // match d^2 < 2 * range^2 the published range so we can model
- // reduced signal strength
- double twiceRange = 2 * (*current)->get_range() * SG_NM_TO_METER;
- if ( d2 < (twiceRange * twiceRange)) {
- // cout << "d2 = " << d2 << " min_dist = " << min_dist << endl;
- if ( d2 < min_dist ) {
- min_dist = d2;
- found_one = true;
- *nav = (**current);
- // cout << "matched = " << (*current)->get_ident() << endl;
- } else {
- // cout << "matched, but too far away = "
- // << (*current)->get_ident() << endl;
- }
- }