harmonize all GPS tolerance distances to 60m
This commit is contained in:
parent
1661681044
commit
ca04c3c1d7
1 changed files with 5 additions and 5 deletions
|
@ -264,12 +264,12 @@ public class RoutingHelper {
|
|||
}
|
||||
}
|
||||
|
||||
// 4. >50m away from current routeNode? Then re-calculate route.
|
||||
// 4. >60m away from current routeNode? Then re-calculate route.
|
||||
if(currentRoute > 0){
|
||||
float bearing = routeNodes.get(currentRoute - 1).bearingTo(routeNodes.get(currentRoute));
|
||||
float bearingMovement = currentLocation.bearingTo(routeNodes.get(currentRoute));
|
||||
float d = Math.abs(currentLocation.distanceTo(routeNodes.get(currentRoute)) * FloatMath.sin((bearingMovement - bearing)*3.14f/180f));
|
||||
if(d > 50) {
|
||||
if(d > 60) {
|
||||
log.info("Recalculate route, because correlation : " + d); //$NON-NLS-1$
|
||||
calculateRoute = true;
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ public class RoutingHelper {
|
|||
// 5. Sum distance to last and current route nodes
|
||||
if(!calculateRoute){
|
||||
float d = currentLocation.distanceTo(routeNodes.get(currentRoute));
|
||||
if (d > 80) {
|
||||
if (d > 60) {
|
||||
if (currentRoute > 0) {
|
||||
// 5a. Greater than 2*distance between them? Then re-calculate route. (Case often covered by 4., but still needed.)
|
||||
float f1 = currentLocation.distanceTo(routeNodes.get(currentRoute - 1)) + d;
|
||||
|
@ -306,7 +306,7 @@ public class RoutingHelper {
|
|||
lastFixedLocation = currentLocation;
|
||||
|
||||
// 8. Strange Direction? Then re-calculate route. (Added new, may possibly even replace triggers 4, 5a, 5b ?)
|
||||
if(suppressTurnPrompt && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > 100) ){
|
||||
if(suppressTurnPrompt && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > 60) ){
|
||||
calculateRoute = true;
|
||||
}
|
||||
|
||||
|
@ -329,7 +329,7 @@ public class RoutingHelper {
|
|||
float bearing = routeNodes.get(currentRoute - 1).bearingTo(routeNodes.get(currentRoute));
|
||||
float bearingMovement = currentLocation.bearingTo(routeNodes.get(currentRoute));
|
||||
float d = Math.abs(currentLocation.distanceTo(routeNodes.get(currentRoute)) * FloatMath.sin((bearingMovement - bearing)*3.14f/180f));
|
||||
if(d > 50){
|
||||
if(d > 60){
|
||||
processed = true;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue