Fix loading and updating of NST data, consistent with other level 3 data

This commit is contained in:
Dan Paulat 2024-02-24 22:50:12 -06:00
parent 29e87fc11e
commit 5b9df2b61a
4 changed files with 98 additions and 41 deletions

View file

@ -131,22 +131,17 @@ void OverlayProductLayer::Impl::UpdateStormTrackingInformation()
auto overlayProductView = self_->context()->overlay_product_view();
auto radarProductManager = overlayProductView->radar_product_manager();
auto record = overlayProductView->radar_product_record("NST");
auto message = overlayProductView->radar_product_message("NST");
float latitude = 0.0f;
float longitude = 0.0f;
std::shared_ptr<wsr88d::Level3File> l3File = nullptr;
std::shared_ptr<wsr88d::rpg::StormTrackingInformationMessage> sti = nullptr;
std::shared_ptr<wsr88d::rpg::ProductSymbologyBlock> psb = nullptr;
if (record != nullptr)
{
l3File = record->level3_file();
}
if (l3File != nullptr)
if (message != nullptr)
{
sti = std::dynamic_pointer_cast<
wsr88d::rpg::StormTrackingInformationMessage>(l3File->message());
wsr88d::rpg::StormTrackingInformationMessage>(message);
}
if (sti != nullptr)
{