suppress turn prompt also for recalculated still-opposite route

This commit is contained in:
sonora 2012-02-20 06:36:19 +01:00
parent 4c41948378
commit 85423cf60c

View file

@ -359,16 +359,14 @@ public class RoutingHelper {
float bearingRoute;
bearingRoute = currentLocation.bearingTo(routeNodes.get(currentRoute));
if (Math.abs(bearing - bearingRoute) > 45f && 360 - Math.abs(bearing - bearingRoute) > 45f) {
if (Math.abs(bearing - bearingRoute) <= 135f && 360 - Math.abs(bearing - bearingRoute) <= 135f) {
//float d = currentLocation.distanceTo(routeNodes.get(currentRoute));
//if (d > 50) {
// disregard upper bound to suppress turn prompt also for recalculated still-opposite route
//if (Math.abs(bearing - bearingRoute) <= 135f && 360 - Math.abs(bearing - bearingRoute) <= 135f) {
suppressTurnPrompt = true;
//log.info("Bearing is off from bearingRoute between >45 and <=135 degrees"); //$NON-NLS-1$
//}
}
}
}
}
// 7. Check necessity for unscheduled U-turn, Issue 863
if(routeNodes.size() > 0){