In the vessel_id stage, detect when there are multiple segments with the same identity that overlap in time. In this case, assign a vessel_id based on the identity fields to the segment with the greatest number of positions (or messages?) and assign a vessel_id based on the segment_id to all the other segments
In the vessel_id stage, detect when there are multiple segments with the same identity that overlap in time. In this case, assign a vessel_id based on the identity fields to the segment with the greatest number of positions (or messages?) and assign a vessel_id based on the segment_id to all the other segments