Better absolute vehicle coords #4
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes changes made for Epicam in order to improve the absolute coordinates of the vehicle trajectories, in the case of multilane links that are not straight.
Previously, the absolute position of a vehicle in a lane was computed on the child lane linestring geometry, using the linear position of the vehicle along the lane's parent link (in symuvia, vehicle positions on a link are computed based on the link's length, and not the length of the lane the vehicle is in). Since the parent link's geometry and the lane geometry are offsetted, the length of each of their segments can be different (and is very different on curved roads).
This PR uses the parent link segments lengths to identify the current segment of the vehicle, and then consider the ratio of this segment's length for the link and the lane to use the correct linear coordinate to use against the geometry of the lane.