slv.measurements.mobile.receptors.find_segment_crossings#
- slv.measurements.mobile.receptors.find_segment_crossings(fixes, points=None, max_gap='10min', max_point_dist=60.0)[source]#
Split the GPS record into crossings of the 2-km segments.
Each fix is snapped to the nearest 50-m network point (dropped if farther than
max_point_distm) and inherits its segment; a crossing is a run of consecutive fixes on one segment with no gap longer thanmax_gap. One row per crossing:crossing,segment,lines(letters common to every point hit — the line the train was on, inLINE_LETTERSorder;"RGB"when only shared trunk points were hit),t_start,t_end,t_median,n_fix,n_points(distinct 50-m points hit),n_segment_points(points the segment has on that line),span_m,segment_extent_mandcoverage.span_mis measured along the route (thes_<line>coordinate of the points hit, fromload_trax_network_points()), not as a straight line from the first fix: on a bent segment a full traverse can be 2.6 km of rail but only 1.8 km of chord, so a chord would make the same coverage look different on straight and bent segments.segment_extent_mis the along-route length of the release geometry (release_points()) andcoverage = span_m / segment_extent_mis the fraction of it the train actually drove.- Return type: