diff --git a/leuvenmapmatching/matcher/base.py b/leuvenmapmatching/matcher/base.py index 1b6cf89..e176944 100644 --- a/leuvenmapmatching/matcher/base.py +++ b/leuvenmapmatching/matcher/base.py @@ -1073,7 +1073,7 @@ def _match_non_emitting_states_end(self, cur_lattice, obs_idx, obs_next, # Move to next edge if m.edge_m.l1 != nbr_label2 and m.edge_m.l2 != nbr_label2: edge_m = Segment(nbr_label1, nbr_loc1, nbr_label2, nbr_loc2) - edge_o = Segment(f"O{obs_idx+1}", obs_next) + edge_o = Segment(f"O{obs_idx}", obs_next) m_next = m.next(edge_m, edge_o, obs=obs_idx) if m_next is not None: if m_next.shortkey in lattice_best: @@ -1117,7 +1117,7 @@ def _match_non_emitting_states_end(self, cur_lattice, obs_idx, obs_next, if m.edge_m.l1 != nbr_label: # edge_m = Segment(m.edge_m.l1, m.edge_m.p1, nbr_label, nbr_loc) edge_m = Segment(nbr_label, nbr_loc) - edge_o = Segment(f"O{obs_idx+1}", obs_next) + edge_o = Segment(f"O{obs_idx}", obs_next) m_next = m.next(edge_m, edge_o, obs=obs_idx) if m_next is not None: if m_next.shortkey in lattice_best: