Display the selected speed units for level 2 data

This commit is contained in:
Dan Paulat 2024-05-01 00:24:36 -05:00
parent a29256d77e
commit 3df6363211
8 changed files with 117 additions and 16 deletions

View file

@ -395,14 +395,24 @@ bool RadarProductLayer::RunMousePicking(
std::string suffix {};
std::string hoverText;
std::shared_ptr<common::ColorTable> colorTable =
radarProductView->color_table();
if (colorTable != nullptr)
// Determine units from radar product view
units = radarProductView->units();
if (!units.empty())
{
// Scale data value according to the color table, and get units
f = f * colorTable->scale() + colorTable->offset();
units = colorTable->units();
f = f * radarProductView->unit_scale();
}
else
{
std::shared_ptr<common::ColorTable> colorTable =
radarProductView->color_table();
if (colorTable != nullptr)
{
// Scale data value according to the color table, and get
// units
f = f * colorTable->scale() + colorTable->offset();
units = colorTable->units();
}
}
if (code.has_value() &&