]> err.no Git - mapper/commitdiff
Display a silly angle difference
authorKaj-Michael Lang <milang@angel.tal.org>
Fri, 10 Aug 2007 08:23:03 +0000 (11:23 +0300)
committerKaj-Michael Lang <milang@angel.tal.org>
Fri, 10 Aug 2007 08:23:03 +0000 (11:23 +0300)
src/gps-nmea-parse.c
src/gps-panels.c

index fd8fd577958287e92cd32515b0c83376631b07b9..5c45f5382e4e950fa5455e0fb417415cfc622321 100644 (file)
@@ -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();
                }
        }
index 8206157f977dc3b406336ecdb1cdc5f114cd7b2f..5304426af2c4f90a6cf551d98f1016620e1540ff 100644 (file)
@@ -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);