pub fn build_path_from_viterbi(
viterbi: &ViterbiResult,
position_candidates: &[Vec<CandidateNetElement>],
netelements: &[Netelement],
netelement_index: &HashMap<String, usize>,
graph: &DiGraph<NetelementSide, f64>,
node_map: &HashMap<NetelementSide, NodeIndex>,
cache: &mut ShortestPathCache,
) -> Result<Vec<AssociatedNetElement>, ProjectionError>Expand description
Convert Viterbi output into a sequence of AssociatedNetElement segments.
- Deduplicates consecutive same-netelement entries.
- Inserts bridge netelements between non-adjacent observed NEs (recovered from cached Dijkstra paths if available; otherwise left as a direct jump, which downstream code can flag).
- Computes intrinsic ranges and GNSS index ranges per segment.