weglide / bugtracker

WeGlide platform bug tracker.
https://www.weglide.org
11 stars 1 forks source link

DMSt rectangle scoring with start on leg #98

Closed frantzheld closed 3 years ago

frantzheld commented 3 years ago

Describe the bug Task scoring calculation may be wrong when starting a rectangle on leg. A correct rectangle is not scored as such.

To Reproduce Steps to reproduce the behavior:

  1. Plan task as seen on screenshot 1
  2. See that task is scored as rectangle
  3. Plan same task with start on leg, see screenshot 2
  4. See that task is scored as free

Expected behavior As both tasks are identical (except for the start), they should both been scored identical (as rectangle).

Screenshots Start on the edge: Scored as declared rectangle image

Start on leg: Scored as free image

frantzheld commented 3 years ago

If I split the rectangle in two triangles, you can see that both are valid DMSt triangles.

image image

Btw: Displaying the valid sector as well for rectangles would help a lot for planning. The sectors for both turnpoints of the shared leg have to be constructed as an overlap of both triangle sectors for the respective turnpoint. In this example I marked them in yellow. The shape gets a bit strange, but should be valid. image

moldhouse commented 3 years ago

@samuel-git could we draw both triangle sectors and then see only mark the overlap on the map. This would be much simpler than calculating the edges of the rectangle sectors.

samuel-git commented 3 years ago

This is possible with https://turfjs.org/docs/#intersect. My concern is the real time performance as tur is notoriously slow.

moldhouse commented 3 years ago

Can you confirm that the problem is fixed for your task?

frantzheld commented 3 years ago

Yes, thank you! image

Closed, as original issue is fixed. Feel free to reopen/rename if you have some time for the rectangle sector drawing :)