From: Kaj-Michael Lang Date: Fri, 10 Aug 2007 08:23:03 +0000 (+0300) Subject: Display a silly angle difference X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=accdeb333d796af2ee114ee9c69e7d65e707b7ed;p=mapper Display a silly angle difference --- diff --git a/src/gps-nmea-parse.c b/src/gps-nmea-parse.c index fd8fd57..5c45f53 100644 --- a/src/gps-nmea-parse.c +++ b/src/gps-nmea-parse.c @@ -183,6 +183,7 @@ void channel_parse_rmc(gchar * sentence) track_drop_cnt=0; integerize_data(_vel_offsetx, _vel_offsety, _pos, _gps); track_add(_pos.time, newly_fixed); + _gps.lheading=_gps.heading; refresh_mark(); } } diff --git a/src/gps-panels.c b/src/gps-panels.c index 8206157..5304426 100644 --- a/src/gps-panels.c +++ b/src/gps-panels.c @@ -623,8 +623,7 @@ gps_display_details(void) switch (_units) { case UNITS_MI: case UNITS_NM: - buffer = g_strdup_printf("%.1f ft", - _pos.altitude * 3.2808399f); + buffer = g_strdup_printf("%.1f ft", _pos.altitude * 3.2808399f); break; default: buffer = g_strdup_printf("%.1f m", _pos.altitude); @@ -634,7 +633,7 @@ gps_display_details(void) g_free(buffer); /* heading */ - buffer = g_strdup_printf("%0.0f°", _gps.heading); + buffer = g_strdup_printf("%0.0f° (%0.0f)", _gps.heading, fabs(_gps.heading-_gps.lheading)); gtk_label_set_label(GTK_LABEL(_sdi_hea), buffer); g_free(buffer);