use non-standard coordinates for tdwr and optimize there generation

This commit is contained in:
AdenKoperczak 2025-03-14 11:09:43 -04:00
parent 8dfb2fe69c
commit f0ba7296d5
3 changed files with 49 additions and 17 deletions

View file

@ -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

View file

@ -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;