]> git.street.me.uk Git - andy/viking.git/commitdiff
gpx_write_trackpoint():
authorTal B <tal.bav@gmail.com>
Thu, 21 May 2009 11:10:15 +0000 (14:10 +0300)
committerGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Fri, 22 May 2009 10:33:12 +0000 (12:33 +0200)
src/gpx.c

index 6c611a87db08f4252a53c37952a7778af9085dae..c54f0eb8be057f1eae9e68a5bd02ecfc308b5fed 100644 (file)
--- a/src/gpx.c
+++ b/src/gpx.c
@@ -722,24 +722,22 @@ static void gpx_write_trackpoint ( VikTrackpoint *tp, GpxWritingContext *context
   g_free(time_iso8601);
   time_iso8601 = NULL;
   
-  if (tp->extended && (tp->fix_mode >= VIK_GPS_MODE_2D)) {
-    if (!isnan(tp->course)) {
-      gchar *s_course = a_coords_dtostr(tp->course);
-      fprintf ( f, "    <course>%s</course>\n", s_course );
-      g_free(s_course);
-    }
-    if (!isnan(tp->speed)) {
-      gchar *s_speed = a_coords_dtostr(tp->speed);
-      fprintf ( f, "    <speed>%s</speed>\n", s_speed );
-      g_free(s_speed);
-    }
-    if (tp->fix_mode == VIK_GPS_MODE_2D)
-      fprintf ( f, "    <fix>2d</fix>\n");
-    if (tp->fix_mode == VIK_GPS_MODE_3D)
-      fprintf ( f, "    <fix>3d</fix>\n");
-    if (tp->nsats > 0)
-      fprintf ( f, "    <sat>%d</sat>\n", tp->nsats );
+  if (!isnan(tp->course)) {
+    gchar *s_course = a_coords_dtostr(tp->course);
+    fprintf ( f, "    <course>%s</course>\n", s_course );
+    g_free(s_course);
+  }
+  if (!isnan(tp->speed)) {
+    gchar *s_speed = a_coords_dtostr(tp->speed);
+    fprintf ( f, "    <speed>%s</speed>\n", s_speed );
+    g_free(s_speed);
   }
+  if (tp->fix_mode == VIK_GPS_MODE_2D)
+    fprintf ( f, "    <fix>2d</fix>\n");
+  if (tp->fix_mode == VIK_GPS_MODE_3D)
+    fprintf ( f, "    <fix>3d</fix>\n");
+  if (tp->nsats > 0)
+    fprintf ( f, "    <sat>%d</sat>\n", tp->nsats );
 
   s_dop = NULL;
   if ( tp->hdop != VIK_DEFAULT_DOP )