removed distance-based rejection filter

This commit is contained in:
PacoX
2026-05-14 12:55:46 +02:00
parent 4a066e08dc
commit 87b0fd6fc7
+3 -10
View File
@@ -982,7 +982,6 @@ List<_PathHop> _buildPathHops(
: null; : null;
var previousPosition = startPoint; var previousPosition = startPoint;
final distance = Distance(); final distance = Distance();
var lastDistance = 0.0;
var bestDistance = 0.0; var bestDistance = 0.0;
final hops = <_PathHop>[]; final hops = <_PathHop>[];
@@ -1029,15 +1028,9 @@ List<_PathHop> _buildPathHops(
previousPosition = resolvedPosition; previousPosition = resolvedPosition;
} }
// If the best candidate is much farther than the previous hop, it's likely not the correct match. // NOTE: removed distance-based rejection filter. Accept the best candidate
if (lastDistance + bestDistance > 50000 && // even if the distance is large — historical filtering could drop valid
candidates != null && // long-distance links and cause cascading mismatches.
candidates.isNotEmpty) {
hopIdx--;
lastDistance = bestDistance;
continue;
}
lastDistance = bestDistance;
hops.add( hops.add(
_PathHop( _PathHop(