mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:00:08 +00:00
Coded location logging
This commit is contained in:
parent
db4f37a37d
commit
7d503ec506
4 changed files with 101 additions and 0 deletions
|
|
@ -114,6 +114,11 @@ bool CodedLocation::Parse(const StringRange& lines, const std::string& wfo)
|
|||
{
|
||||
if (token->size() != 8)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(warning)
|
||||
<< logPrefix_
|
||||
<< "Invalid National Center LAT...LON format: \"" << *token
|
||||
<< "\"";
|
||||
|
||||
dataValid = false;
|
||||
break;
|
||||
}
|
||||
|
|
@ -137,6 +142,27 @@ bool CodedLocation::Parse(const StringRange& lines, const std::string& wfo)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tokenList.empty())
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(warning) << logPrefix_ << "LAT...LON not found";
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(warning)
|
||||
<< logPrefix_
|
||||
<< "Malformed LAT...LON tokens: (0: " << tokenList.at(0)
|
||||
<< ", size: " << tokenList.size() << ")";
|
||||
|
||||
for (const auto& token : tokenList)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << token;
|
||||
}
|
||||
}
|
||||
|
||||
dataValid = false;
|
||||
}
|
||||
|
||||
if (dataValid)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -175,6 +175,28 @@ bool CodedTimeMotionLocation::Parse(const StringRange& lines,
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tokenList.empty())
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(warning)
|
||||
<< logPrefix_ << "TIME...MOT...LOC not found";
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(warning)
|
||||
<< logPrefix_
|
||||
<< "Malformed TIME...MOT...LOC tokens: (0: " << tokenList.at(0)
|
||||
<< ", size: " << tokenList.size() << ")";
|
||||
|
||||
for (const auto& token : tokenList)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << token;
|
||||
}
|
||||
}
|
||||
|
||||
dataValid = false;
|
||||
}
|
||||
|
||||
return dataValid;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue