MCPcopy Create free account
hub / github.com/comaps/comaps / ParseSetGpsTrackMinAccuracyCommand

Function ParseSetGpsTrackMinAccuracyCommand

libs/map/framework.cpp:142–159  ·  view source on GitHub ↗

TODO! To adjust GpsTrackFilter was added secret command "?gpstrackaccuracy:xxx;" where xxx is a new value for horizontal accuracy. This is temporary solution while we don't have a good filter.

Source from the content-addressed store, hash-verified

140// where xxx is a new value for horizontal accuracy.
141// This is temporary solution while we don't have a good filter.
142bool ParseSetGpsTrackMinAccuracyCommand(string const & query)
143{
144 char constexpr kGpsAccuracy[] = "?gpstrackaccuracy:";
145 if (!query.starts_with(kGpsAccuracy))
146 return false;
147
148 size_t const end = query.find(';', sizeof(kGpsAccuracy) - 1);
149 if (end == string::npos)
150 return false;
151
152 string s(query.begin() + sizeof(kGpsAccuracy) - 1, query.begin() + end);
153 double value;
154 if (!strings::to_double(s, value))
155 return false;
156
157 GpsTrackFilter::StoreMinHorizontalAccuracy(value);
158 return true;
159}
160} // namespace
161
162pair<MwmSet::MwmId, MwmSet::RegResult> Framework::RegisterMap(LocalCountryFile const & file)

Callers 1

Calls 3

to_doubleFunction · 0.50
findMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected