/* We are probably on the same way as last time,
but check if the distance is over a limit or our heading has changed significantly.
*/
- if ( (dist>(gdouble)way_dist_range) || (fabs(heading-map_loc->heading)>10.0)) {
+ if ( (dist>(gdouble)way_dist_range) || (fabs(angle_diff(heading, map_loc->heading))>15.0)) {
/* We have moved a large amount, check way again */
- g_debug("Distance %.2f > %.2f range or angle %f > 10.0, checking location",
+ g_debug("Distance %.2f > %.2f range or angle %f > 15.0, checking location",
dist, (gdouble)way_dist_range, fabs(heading-map_loc->heading));
osm_way_free(map_loc->street);
map_loc->street=osm_find_nearest_way(lat, lon);