diff --git a/mola_input_mulran_dataset/src/MulranDataset.cpp b/mola_input_mulran_dataset/src/MulranDataset.cpp index 964dd68b..c7e45974 100644 --- a/mola_input_mulran_dataset/src/MulranDataset.cpp +++ b/mola_input_mulran_dataset/src/MulranDataset.cpp @@ -161,8 +161,9 @@ void MulranDataset::initialize(const Yaml& c) // Parse into the unified container: for (int row = 0; row < gpsCsvData_.rows(); row++) { - const double t = 1e-9 * gpsCsvData_(row, 0); - const Entry entry = {EntryType::GNNS, static_cast(row)}; + const double t = 1e-9 * gpsCsvData_(row, 0); + Entry entry = {EntryType::GNNS}; + entry.gpsIdx = row; datasetEntries_.emplace(t, entry); } } @@ -337,7 +338,7 @@ void MulranDataset::spinOnce() { if (!publish_gps_) break; - auto o = getGPS(de.gpsIdx); + auto o = get_gps_by_row_index(de.gpsIdx); this->sendObservationsToFrontEnds(o); } break; diff --git a/mola_viz/src/MolaViz.cpp b/mola_viz/src/MolaViz.cpp index 7607e525..01acc182 100644 --- a/mola_viz/src/MolaViz.cpp +++ b/mola_viz/src/MolaViz.cpp @@ -386,6 +386,7 @@ void gui_handler_gps( if (!obj) return; std::array labels; + labels.fill(nullptr); if (w->children().size() == 1) { w->setLayout(new nanogui::GridLayout( @@ -395,7 +396,7 @@ void gui_handler_gps( for (size_t i = 0; i < labels.size(); i++) labels[i] = w->add(" "); - const int winW = 200; + const int winW = 250; w->setSize({winW, 0}); w->setFixedSize({winW, 0}); @@ -412,9 +413,9 @@ void gui_handler_gps( gga) { labels[0]->setCaption( - mrpt::format("Latitude: %.02f deg", gga->fields.latitude_degrees)); + mrpt::format("Latitude: %.06f deg", gga->fields.latitude_degrees)); labels[1]->setCaption(mrpt::format( - "Longitude: %.02f deg", gga->fields.longitude_degrees)); + "Longitude: %.06f deg", gga->fields.longitude_degrees)); labels[2]->setCaption( mrpt::format("Altitude: %.02f m", gga->fields.altitude_meters)); labels[3]->setCaption(mrpt::format("HDOP: %.02f", gga->fields.HDOP));