-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Respect initial bearings order #4443
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general this PR looks fine. I am a bit confused by the one comment though, for which it would be unclear to me what CW/CCW refer to. I think that this comment could benefit from some clarification.
makeCompareShapeDataAngleToBearing(base_bearing)); | ||
|
||
// sort roads with respect to the initial bearings, tie-breaker for equal initial bearings | ||
// is to order CCW road before CW one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oxidase personally I do not understand what wold be a cw road/ccw road. Could you clarify here a bit?
c92c412
to
7370efc
Compare
@MoKob i have updated comment, we have to keep roads in the clockwise order with respect to "final" bearings if initial bearings are equal. This is the original behavior, that potentially should not be observed in real data, but in some tests where roads can overlap
|
7370efc
to
160ae66
Compare
Issue
PR fixes #4331.
For the sample intersection
PR adds ordering by initial bearings and adjustment of bearings to keep the original order.
For the above example, bearings ordered in the initial order are
322.542, 170.53, 163.646
and after the adjustment are322.542,170.53,171.03
.The adjustment angle is at most 0.5 degree or a half-angle between the road bearing and the base bearing.
Tasklist