From b2dc526b9abd981b31887e5092e84973409e9aa9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 22 Aug 2018 18:54:46 +0200 Subject: [PATCH] Fix gpx printer --- src/algorithms/PVT/libs/gpx_printer.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/algorithms/PVT/libs/gpx_printer.cc b/src/algorithms/PVT/libs/gpx_printer.cc index 1949bb7dc..51fa6760f 100644 --- a/src/algorithms/PVT/libs/gpx_printer.cc +++ b/src/algorithms/PVT/libs/gpx_printer.cc @@ -123,8 +123,9 @@ bool Gpx_Printer::print_position(const std::shared_ptr& position, double vdop = position_->get_vdop(); double pdop = position_->get_pdop(); std::string utc_time = to_iso_extended_string(position_->get_position_UTC_time()); - utc_time.resize(23); // time up to ms - utc_time.append("Z"); // UTC time zone + if (utc_time.length() < 23) utc_time += "."; + utc_time.resize(23, '0'); // time up to ms + utc_time.append("Z"); // UTC time zone if (print_average_values == false) {