mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 13:30:06 +00:00
Store and retrieve level 3 data
This commit is contained in:
parent
15f7caa6b3
commit
039b2b3d8e
2 changed files with 22 additions and 1 deletions
|
|
@ -398,7 +398,7 @@ RadarProductManagerImpl::StoreRadarProductRecord(
|
|||
}
|
||||
else if (record->radar_product_group() == common::RadarProductGroup::Level3)
|
||||
{
|
||||
auto productMap = level3ProductRecords_[record->radar_product()];
|
||||
auto& productMap = level3ProductRecords_[record->radar_product()];
|
||||
|
||||
auto it = productMap.find(record->time());
|
||||
if (it != productMap.cend())
|
||||
|
|
@ -442,6 +442,23 @@ RadarProductManager::GetLevel2Data(wsr88d::rda::DataBlockType dataBlockType,
|
|||
return std::tie(radarData, elevationCut, elevationCuts);
|
||||
}
|
||||
|
||||
std::shared_ptr<wsr88d::rpg::Level3Message>
|
||||
RadarProductManager::GetLevel3Data(const std::string& product,
|
||||
std::chrono::system_clock::time_point time)
|
||||
{
|
||||
std::shared_ptr<wsr88d::rpg::Level3Message> message = nullptr;
|
||||
|
||||
std::shared_ptr<types::RadarProductRecord> record =
|
||||
p->GetLevel3ProductRecord(product, time);
|
||||
|
||||
if (record != nullptr)
|
||||
{
|
||||
message = record->level3_file()->message();
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
std::shared_ptr<RadarProductManager>
|
||||
RadarProductManager::Instance(const std::string& radarSite)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@ public:
|
|||
float elevation,
|
||||
std::chrono::system_clock::time_point time = {});
|
||||
|
||||
std::shared_ptr<wsr88d::rpg::Level3Message>
|
||||
GetLevel3Data(const std::string& product,
|
||||
std::chrono::system_clock::time_point time = {});
|
||||
|
||||
static std::shared_ptr<RadarProductManager>
|
||||
Instance(const std::string& radarSite);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue