weglide / bugtracker

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

WeGlide task cup file not compatible with XCSoar #91

Closed frantzheld closed 3 years ago

frantzheld commented 3 years ago

Describe the bug A downloaded task cup file is not readable by XCSoar.

To Reproduce Steps to reproduce the behavior:

  1. Download any task
  2. Open it to XCSoar
  3. See, that the task is empty

Expected behavior WeGlide tasks should be compatible with XCSoar.

Additional information I played around with a downloaded cup file and found two problems, that lead to the issue.

I added elevation, takeoff and landing to the cup file, then the cup file was read by XCSoar.

Screenshot Left: weGlide task, Right: customized task, which is compatible with XCSoar image

moldhouse commented 3 years ago

Could you provide the id of the corresponding task?

Btw, we already provide download in .tsk format via api. @samuel-git pls also add to frontend.

moldhouse commented 3 years ago

I will check but my understanding is that takeoff and landing may be empty in the .cup format.

frantzheld commented 3 years ago

My test above uses this simple task: https://beta.weglide.org/task/11502

When takeoff and landing is empty, XCSoar reads the task, but the last turnpoint is missing. So the back-and-return task Lüneburg-Hoepen-Lüneburg gets an one-way task Lüneburg-Hoepen.

moldhouse commented 3 years ago

I suspect this to be an error by XCSoar, as we do provide an empty field for landing airport. This fields is not used anymore, so I would rather leave it empty than write an empty value. However, I don't think this error has any implications as you can simply download in .tsk format.

moldhouse commented 3 years ago

http://api.weglide.org/v1/task/11502?tsk=1

frantzheld commented 3 years ago

.tsk works a lot better for XCSoar. Thank you! :)

There is still one issue with the .tsk file: The turnpint is read as 'Area sector' with 100km radius. image So XCSoar is creating a turnpoint within this area (like for AAT): image

This is part of the .tsk file from WeGlide:

    <Point type="Area">
        <Waypoint name="Hoepen_58945">
            <Location latitude="53.14738806763555" longitude="9.796371459960938"/>
        </Waypoint>
        <ObservationZone radius="100000" type="SymmetricQuadrant"/>
    </Point>

I changed the point type from Area to Turn and the observation zone to FAISector:

    <Point type="Turn">
        <Waypoint name="Hoepen_58945">
            <Location latitude="53.14738806763555" longitude="9.796371459960938"/>
        </Waypoint>
        <ObservationZone type="FAISector"/>
    </Point>

Now XCSoar displays the same task as shown in the task planner: image

moldhouse commented 3 years ago

So i think the kind should be TURN? Radius is problematic since in theory, the quadrants are unlimited in size. If we set it to 10km (which would nicely display) people could be confused. However, I see that 100km is also not optimal.

frantzheld commented 3 years ago

Yes, Turn should be correct for racing tasks. Area is only used for assigned area tasks in gliding competitions.

The FAISector should be the right one for infinite radius, if the description is correct: image

frantzheld commented 3 years ago

Unfortunately XCSoar does not behave as described above. As tested here, XCSoar doesn't get the turn: image

But this seems like an issue for XCSoar, not for weglide :)

samuel-git commented 3 years ago

.tsk support is coming with next release.

frantzheld commented 3 years ago

.tsk download works perfect. 👍 Thanks a lot!