Skip to content

Commit

Permalink
Fix GPS
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Feb 9, 2024
1 parent f136aad commit ad1b5c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions mola_input_mulran_dataset/src/MulranDataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<timestep_t>(row)};
const double t = 1e-9 * gpsCsvData_(row, 0);
Entry entry = {EntryType::GNNS};
entry.gpsIdx = row;
datasetEntries_.emplace(t, entry);
}
}
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions mola_viz/src/MolaViz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ void gui_handler_gps(
if (!obj) return;

std::array<nanogui::Label*, 5> labels;
labels.fill(nullptr);
if (w->children().size() == 1)
{
w->setLayout(new nanogui::GridLayout(
Expand All @@ -395,7 +396,7 @@ void gui_handler_gps(
for (size_t i = 0; i < labels.size(); i++)
labels[i] = w->add<nanogui::Label>(" ");

const int winW = 200;
const int winW = 250;
w->setSize({winW, 0});
w->setFixedSize({winW, 0});

Expand All @@ -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));
Expand Down

0 comments on commit ad1b5c1

Please sign in to comment.