Skip to main content

build_path_from_viterbi

Function build_path_from_viterbi 

Source
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.

  1. Deduplicates consecutive same-netelement entries.
  2. 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).
  3. Computes intrinsic ranges and GNSS index ranges per segment.