if (_dest.valid) {
dt=calculate_distance(lat, lon, _dest.lat, _dest.lon);
dh=calculate_course(lat, lon, _dest.lat, _dest.lon);
- snprintf(buffer, sizeof(buffer), "%.02f %s (%0.02f)", dt * UNITS_CONVERT[_units], UNITS_TEXT[_units], dh);
+ snprintf(buffer, sizeof(buffer), "%.02f %s (%0.02f)", dt * UNITS_CONVERT[_units], UNITS_TEXT[_units], dh<0 ? 360+dh : dh);
gtk_label_set_label(GTK_LABEL(info_banner.distance), buffer);
if (dt<0.005 && dest_reached==FALSE) {
- speak_text("You have reached your destination.");
+ if (_center_mode>0)
+ speak_text("You have reached your destination.");
dest_reached=TRUE;
} else if (dt<prev_dt-KM10KNOTS) {
- snprintf(buffer, sizeof(buffer), "Distance to destination: %.02f %s", dt * UNITS_CONVERT[_units], UNITS_TEXT[_units]);
- speak_text(buffer);
+ if (_center_mode>0) {
+ snprintf(buffer, sizeof(buffer), "Distance to destination: %.02f %s", dt * UNITS_CONVERT[_units], UNITS_TEXT[_units]);
+ speak_text(buffer);
+ }
prev_dt=dt;
} else if (dt>prev_dt+KM10KNOTS/4) {
prev_dt=dt;
press[1] = y;
before[0] = press[0];
before[1] = press[1];
+_center_mode=CENTER_MANUAL;
map_drag_id=g_signal_connect(G_OBJECT(_map_widget), "motion_notify_event", G_CALLBACK(map_follow_move_cb), NULL);
}