Update tracking information

This commit is contained in:
Victor Shcherb 2012-06-18 00:54:10 +02:00
parent 1a35e011d5
commit 293ec9d60c
6 changed files with 14 additions and 44 deletions

View file

@ -226,7 +226,7 @@
<string name="settings_preset">User Profile</string>
<string name="settings_preset_descr">Select a user profile with custom map and navigation settings.</string>
<string name="monitor_preferences">Tracking</string>
<string name="monitor_preferences">- Tracking</string>
<string name="monitor_preferences_descr">Specify tracking settings</string>
<string name="routing_settings">- Navigation</string>
<string name="routing_settings_descr">Specify navigation options</string>

View file

@ -73,7 +73,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
@Override
public void settingsActivityCreate(final SettingsActivity activity, PreferenceScreen screen) {
Preference offlineData = screen.findPreference("index_settings");
Preference offlineData = screen.findPreference("local_indexes");
if(offlineData == null) {
log.error("OsmandMonitoringPlugin: Index settings preference not found !");
} else {

View file

@ -95,7 +95,7 @@ public class RouteAnimation {
}
});
try {
Thread.sleep(1000);
Thread.sleep(1500);
} catch (InterruptedException e) {
// do nothing
}

View file

@ -235,13 +235,9 @@ public class RoutingHelper {
int index = currentRoute;
while (iterations > 0 && currentRoute + 1 < routeNodes.size()) {
newDist = getOrthogonalDistance(currentLocation, routeNodes.get(currentRoute), routeNodes.get(currentRoute + 1));
if (newDist < dist) {
index = currentRoute;
dist = newDist;
if (newDist < POSITION_TOLERANCE) {
break;
}
}
currentRoute++;
iterations--;
@ -275,7 +271,7 @@ public class RoutingHelper {
}
} else if (newDist < dist || newDist < 10) {
// newDist < 10 (avoid distance 0 till next turn)
if (dist > 3 * POSITION_TOLERANCE /2 ) {
if (dist > POSITION_TOLERANCE) {
processed = true;
if (log.isDebugEnabled()) {
log.debug("Processed by distance : " + newDist + " " + dist); //$NON-NLS-1$//$NON-NLS-2$
@ -316,37 +312,6 @@ public class RoutingHelper {
clearCurrentRoute(null);
return true;
}
// FIXME Probably not needed already
// // Double check if turn is passed or not
// // 3.1 check if closest location already passed
// if (currentRoute + 1 < routeNodes.size()) {
// float bearingRouteNext = routeNodes.get(currentRoute).bearingTo(routeNodes.get(currentRoute + 1));
// float bearingToRoute = currentLocation.bearingTo(routeNodes.get(currentRoute));
// double diff = Math.abs(MapUtils.degreesDiff(bearingToRoute, bearingRouteNext));
// // only 40 degrees for that case because it wrong catches sharp turns
// if (diff < 40) {
// if (log.isDebugEnabled()) {
// log.debug("Processed point bearingToRoute : " + bearingToRoute + " bearingRouteNext " + bearingRouteNext); //$NON-NLS-1$ //$NON-NLS-2$
// }
// route.updateCurrentRoute(currentRoute + 1);
// }
// }
//
// // 3.2 check that we already pass very sharp turn by missing one point (so our turn is sharper than expected)
// // instead of that rule possible could be introduced another if the dist < 5m mark the location as already passed
// if (currentRoute + 2 < routeNodes.size()) {
// float bearingRouteNextNext = routeNodes.get(currentRoute + 1).bearingTo(routeNodes.get(currentRoute + 2));
// float bearingToRouteNext = currentLocation.bearingTo(routeNodes.get(currentRoute + 1));
// double diff = Math.abs(MapUtils.degreesDiff(bearingToRouteNext, bearingRouteNextNext));
// // only 20 degrees for that case because it wrong catches sharp turns
// if (diff < 20) {
// if (log.isDebugEnabled()) {
// log.debug("Processed point bearingToRouteNext : " + bearingToRouteNext + " bearingRouteNextNext " + bearingRouteNextNext); //$NON-NLS-1$ //$NON-NLS-2$
// }
// route.updateCurrentRoute(currentRoute + 2);
// }
// }
return false;
}

View file

@ -31,8 +31,8 @@ public class VoiceRouter {
// Speed in m/s
protected float DEFAULT_SPEED = 12;
protected int PREPARE_LONG_DISTANCE = 3000;
protected int PREPARE_LONG_DISTANCE_END = 2000;
protected int PREPARE_LONG_DISTANCE = 3500;
protected int PREPARE_LONG_DISTANCE_END = 3000;
protected int PREPARE_DISTANCE = 0;
protected int PREPARE_DISTANCE_END = 0;
@ -217,7 +217,12 @@ public class VoiceRouter {
if (dist > PREPARE_LONG_DISTANCE) {
playGoAhead(dist);
}
nextStatusAfter(STATUS_UNKNOWN);
// say long distance message only for long distances > 10 km
if(dist > 3 * PREPARE_LONG_DISTANCE) {
nextStatusAfter(STATUS_UNKNOWN);
} else {
nextStatusAfter(STATUS_LONG_PREPARE);
}
}
}

View file

@ -463,7 +463,7 @@ public class MapInfoLayer extends OsmandMapLayer {
} else {
d = routingHelper.getDistanceToNextNextRouteDirection();
}
if (d > 0 && !showMiniMap) {
if (d >= 0 && !showMiniMap) {
visible = true;
RouteDirectionInfo next = uturnWhenPossible? routingHelper.getNextRouteDirectionInfo() :
routingHelper.getNextNextRouteDirectionInfo();
@ -541,7 +541,7 @@ public class MapInfoLayer extends OsmandMapLayer {
invalidate();
}
} else {
if (d > 0 && !showMiniMap) {
if (d >= 0 && !showMiniMap) {
visible = true;
RouteDirectionInfo next = routeLayer.getHelper().getNextRouteDirectionInfo();
if (next == null) {