A method comprising: obtaining a map centerline point and a vision centerline point of a lane of a roadway in which a host vehicle is traveling, the map centerline point being obtained from a map database, the vision centerline point being obtained from vision data of a vision-based system; adding the map centerline point to a map trail; adding the vision centerline point to a vision trail; maintaining the map trail and the vision trail as a vehicle trail; obtaining a position of the host vehicle; comparing the map centerline point and the vision centerline point to generate a lateral correction and a longitudinal correction relative to the position of the host vehicle; determining a length of the vehicle trail from the position of the host vehicle; determining whether one or more gaps in the vehicle trail are greater than a gap threshold value, respectively; in response to the trail length being greater than a trail length threshold and the one or more gaps being less than the gap threshold value, identifying the vehicle trail as valid and applying the lateral correction and the longitudinal correction to the position of the host vehicle to provide a corrected position of the host vehicle, the trail length threshold being adjusted based on at least one of a speed of the host vehicle or a curvature of the roadway; or in response to the trail length being less than the trail length threshold or the one or more gaps being greater than the gap threshold value, identifying the vehicle trail as invalid and waiting to apply the lateral correction and the longitudinal correction until the vehicle trail is valid; and operating, based on the corrected position, the host vehicle in the roadway. obtaining a map centerline point and a vision centerline point of a lane of a roadway in which a host vehicle is traveling, the map centerline point being obtained from a map database, the vision centerline point being obtained from vision data of a vision-based system; adding the map centerline point to a map trail; adding the vision centerline point to a vision trail; maintaining the map trail and the vision trail as a vehicle trail; obtaining a position of the host vehicle; comparing the map centerline point and the vision centerline point to generate a lateral correction and a longitudinal correction relative to the position of the host vehicle; determining a length of the vehicle trail from the position of the host vehicle; determining whether one or more gaps in the vehicle trail are greater than a gap threshold value, respectively; in response to the trail length being greater than a trail length threshold and the one or more gaps being less than the gap threshold value, identifying the vehicle trail as valid and applying the lateral correction and the longitudinal correction to the position of the host vehicle to provide a corrected position of the host vehicle, the trail length threshold being adjusted based on at least one of a speed of the host vehicle or a curvature of the roadway; or in response to the trail length being less than the trail length threshold or the one or more gaps being greater than the gap threshold value, identifying the vehicle trail as invalid and waiting to apply the lateral correction and the longitudinal correction until the vehicle trail is valid; and operating, based on the corrected position, the host vehicle in the roadway.