mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:40:05 +00:00
use non-standard coordinates for tdwr and optimize there generation
This commit is contained in:
parent
8dfb2fe69c
commit
f0ba7296d5
3 changed files with 49 additions and 17 deletions
|
|
@ -428,9 +428,16 @@ const scwx::util::time_zone* RadarProductManager::default_time_zone() const
|
|||
}
|
||||
}
|
||||
|
||||
bool RadarProductManager::is_tdwr() const
|
||||
{
|
||||
return p->radarSite_->type() == "tdwr";
|
||||
}
|
||||
|
||||
float RadarProductManager::gate_size() const
|
||||
{
|
||||
return (p->radarSite_->type() == "tdwr") ? 150.0f : 250.0f;
|
||||
// tdwr is 150 meter per gate, wsr88d is 250 meter per gate
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
|
||||
return (is_tdwr()) ? 150.0f : 250.0f;
|
||||
}
|
||||
|
||||
std::string RadarProductManager::radar_id() const
|
||||
|
|
@ -454,6 +461,12 @@ void RadarProductManager::Initialize()
|
|||
|
||||
logger_->debug("Initialize()");
|
||||
|
||||
if (is_tdwr())
|
||||
{
|
||||
p->initialized_ = true;
|
||||
return;
|
||||
}
|
||||
|
||||
boost::timer::cpu_timer timer;
|
||||
|
||||
// Calculate half degree azimuth coordinates
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public:
|
|||
[[nodiscard]] const std::vector<float>&
|
||||
coordinates(common::RadialSize radialSize, bool smoothingEnabled) const;
|
||||
[[nodiscard]] const scwx::util::time_zone* default_time_zone() const;
|
||||
[[nodiscard]] bool is_tdwr() const;
|
||||
[[nodiscard]] float gate_size() const;
|
||||
[[nodiscard]] std::string radar_id() const;
|
||||
[[nodiscard]] std::shared_ptr<config::RadarSite> radar_site() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue