initial basic WFO base alert location method

This commit is contained in:
AdenKoperczak 2024-08-29 13:46:52 -04:00
parent 6b4045081e
commit bf24dac317
7 changed files with 198 additions and 140 deletions

View file

@ -151,6 +151,7 @@ void AlertManager::Impl::HandleAlert(const types::TextEventKey& key,
std::string alertCounty = audioSettings.alert_county().GetValue();
auto alertRadius = units::length::kilometers<double>(
audioSettings.alert_radius().GetValue());
std::string alertWFO = audioSettings.alert_wfo().GetValue();
auto message = textEventManager_->message_list(key).at(messageIndex);
@ -195,6 +196,10 @@ void AlertManager::Impl::HandleAlert(const types::TextEventKey& key,
auto fipsIds = segment->header_->ugc_.fips_ids();
auto it = std::find(fipsIds.cbegin(), fipsIds.cend(), alertCounty);
activeAtLocation = it != fipsIds.cend();
} else if (locationMethod == types::LocationMethod::WFO) {
std::string wfoId = vtec.pVtec_.office_id();
activeAtLocation = wfoId == alertWFO;
}
if (activeAtLocation)