Skip to main content
. 2018 Oct 26;18(11):3639. doi: 10.3390/s18113639
Algorithm 2 Spatial and Temporal Matching Algorithm
Input: HCTPlist Pi, Pi+k; CandidateList ci1, ci2cij; Trajetory Pi+1Pi+2 … → Pi+k
Output: OSM-WayID-List;
1: Initialize OSM-WayID-List as empty list;
2: for each ci1 and ci+k1 do
3:   F(ci1) = 1;
4:   F(ci+k1) = 1;
5: end for
6: for t = i + 1 to i + k − 1 do
7:   max = −∞;
8:   for s = 1 to candidateList(Pt).count do
9:    F(cts) = F(ct1j) + F(ct1jcts);
10:    Alt = F(cts);
11:    if (Alt > max) then
12:    max = Alt;
13:    C = max. cts;
14:    end if
15:   end for
16:   OSM-WayID-List.add(C.id);
17: end for