diff --git a/storage.c b/storage.c
index fed1531..b146dd5 100644
--- a/storage.c
+++ b/storage.c
@@ -999,7 +999,8 @@ char *gpx_string(JsonNode *location_array)
//
json_foreach(one, location_array) {
- double lat = 0.0, lon = 0.0;
+ double lat = 0.0, lon = 0.0, alt = 0.0;
+ char *isotst = "";
JsonNode *j;
if ((j = json_find_member(one, "lat")) != NULL) {
@@ -1010,7 +1011,14 @@ char *gpx_string(JsonNode *location_array)
lon = j->number_;
}
- utstring_printf(xml, " \n", lat, lon);
+ if ((j = json_find_member(one, "alt")) != NULL) {
+ alt = j->number_;
+ }
+ if ((j = json_find_member(one, "isotst")) != NULL) {
+ isotst = j->string_;
+ }
+
+ utstring_printf(xml, " %.2f\n", lat, lon, alt, isotst);
}
utstring_printf(xml, "%s", " \n\n\n");