Preserve lap information in PathSimplifier#1209
Merged
Merged
Conversation
Contributor
Author
|
No comments? |
Collaborator
|
I do not use the simplifier myself, have not considered the implications. |
Collaborator
|
Can you rebase, we are preparing a release? |
85cf5b6 to
b7a331b
Compare
Contributor
Author
|
Thanks for the reminder, I rebased. |
gerhardol
approved these changes
Jan 21, 2026
gerhardol
left a comment
Collaborator
There was a problem hiding this comment.
Have not run, but should be fine.
This limits the segments that can be simplified, so the parts may become a little "zig-zag".
But still better to keep the points.
| } else if (((lstate == Constants.DB.LOCATION.TYPE_PAUSE) | ||
| || (lstate == Constants.DB.LOCATION.TYPE_END)) | ||
| // also keep first and last location of a lap to preserve lap information | ||
| || ((lstate == Constants.DB.LOCATION.TYPE_GPS) && lap != lap_prev)) { |
Collaborator
There was a problem hiding this comment.
&& lap != lap_prev
is not needed
Contributor
Author
There was a problem hiding this comment.
You're right, it can be removed
Collaborator
There was a problem hiding this comment.
parenthesis should have been removed to, but we can leave it at this
Keep the first and last location of a lap so lap times and distances are preserved when the path is simplified.
b7a331b to
8bd6e35
Compare
Collaborator
|
thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I noticed lap times and distances changed quite a bit when simplifying the path, this PR tries to change that.
It looks like the code already simplifies by segment, I tried to make it so that every lap is a segment. I quickly tested it and it seems to work, but it's possible I overlooked some things.