From 513e92da23ed20da3956f1c746885b026a964c5b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 25 Nov 2015 14:03:59 +0100 Subject: [PATCH] fixing interface --- src/algorithms/PVT/libs/nmea_printer.cc | 5 +++-- src/algorithms/PVT/libs/nmea_printer.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/algorithms/PVT/libs/nmea_printer.cc b/src/algorithms/PVT/libs/nmea_printer.cc index f8e440b63..e502dab75 100644 --- a/src/algorithms/PVT/libs/nmea_printer.cc +++ b/src/algorithms/PVT/libs/nmea_printer.cc @@ -68,6 +68,7 @@ Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_tty_port, std::s { nmea_dev_descriptor = -1; } + print_avg_pos = false; } @@ -141,7 +142,7 @@ bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr& pvt_data // set the new PVT data d_PVT_data = pvt_data; - d_PVT_data->d_flag_averaging = print_average_values; + print_avg_pos = print_average_values; // generate the NMEA sentences @@ -366,7 +367,7 @@ std::string Nmea_Printer::get_GPRMC() sentence_str << ",V"; }; - if (d_PVT_data->d_flag_averaging == true) + if (print_avg_pos == true) { // Latitude ddmm.mmmm,(N or S) sentence_str << "," << latitude_to_hm(d_PVT_data->d_avg_latitude_d); diff --git a/src/algorithms/PVT/libs/nmea_printer.h b/src/algorithms/PVT/libs/nmea_printer.h index 115ab07c3..40b1e1a63 100644 --- a/src/algorithms/PVT/libs/nmea_printer.h +++ b/src/algorithms/PVT/libs/nmea_printer.h @@ -83,6 +83,7 @@ private: std::string longitude_to_hm(double longitude); std::string latitude_to_hm(double lat); char checkSum(std::string sentence); + bool print_avg_pos; }; #endif