Implement GPX explorer. Issue 514

This commit is contained in:
Victor Shcherb 2011-08-21 15:19:49 +02:00
parent b7c38b27a9
commit 70096f4a74

View file

@ -521,8 +521,11 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
Log.d(LogUtil.TAG, "Location changed " + location.getProvider()); //$NON-NLS-1$
}
if(location != null && settings.SAVE_TRACK_TO_GPX.get()){
savingTrackHelper.insertData(location.getLatitude(), location.getLongitude(),
location.getAltitude(), location.getSpeed(), location.getTime(), settings);
// write only with 50 meters accuracy
if (!location.hasAccuracy() || location.getAccuracy() < 50) {
savingTrackHelper.insertData(location.getLatitude(), location.getLongitude(), location.getAltitude(), location.getSpeed(),
location.getTime(), settings);
}
}
registerUnregisterSensor(location);
updateSpeedBearing(location);