Time information for maximum distance in matching

This commit is contained in:
Lev Dragunov
2017-06-15 17:06:28 +03:00
committed by Patrick Niklaus
parent e3276324b9
commit dc9b4bcfec
2 changed files with 39 additions and 16 deletions
+13 -12
View File
@@ -79,16 +79,6 @@ SubMatchingList mapMatching(SearchEngineData<Algorithm> &engine_working_data,
}
}();
const auto max_broken_time = median_sample_time * MAX_BROKEN_STATES;
const auto max_distance_delta = [&] {
if (use_timestamps)
{
return median_sample_time * facade.GetMapMatchingMaxSpeed();
}
else
{
return MAX_DISTANCE_DELTA;
}
}();
std::vector<std::vector<double>> emission_log_probabilities(trace_coordinates.size());
if (trace_gps_precision.empty())
@@ -155,13 +145,24 @@ SubMatchingList mapMatching(SearchEngineData<Algorithm> &engine_working_data,
for (auto t = initial_timestamp + 1; t < candidates_list.size(); ++t)
{
const auto step_time = trace_timestamps[t] - trace_timestamps[prev_unbroken_timestamps.back()];
const auto max_distance_delta = [&] {
if (use_timestamps)
{
return step_time * facade.GetMapMatchingMaxSpeed();
}
else
{
return MAX_DISTANCE_DELTA;
}
}();
const bool gap_in_trace = [&]() {
// use temporal information if available to determine a split
// but do not determine split by timestamps if wasn't asked about it
if (use_timestamps && allow_splitting)
{
return trace_timestamps[t] - trace_timestamps[prev_unbroken_timestamps.back()] >
max_broken_time;
return step_time > max_broken_time;
}
else
{