Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Speed average" is miscalculated for "FAI badges/records" type task. #1412

Open
ericcarden opened this issue Apr 26, 2024 · 0 comments
Open

Comments

@ericcarden
Copy link
Contributor

XCSoar versions having the problem

v6.8.11-Android and v7.42-Android

XCSoar versions not having the problem

I don't know. The above two versions are the only ones I've tested recently, and I don't remember whether this problem existed with any other versions I've used.

System information

XCSoar v6.8.11-Android on Samsung Galaxy S3 with Android 4.4.2
XCSoar v7.42-Android on Motorola Moto G5 Plus with Android 8.1.0

Steps to reproduce the behavior

  1. Launch XCSoar in SIM mode.
  2. Create a short out-and-return task. The problem doesn't depend on the task length, but a task that will take at least four minutes to fly is probably advisable, since the task time that will be used later in this test procedure is shown with a precision of only one minute. Set "Task type" to "FAI badges/records", and ensure the turnpoint type is "FAI quadrant" (though I expect the issue is the same with the only other option, "Turn point cylinder").
  3. Return to the map page, and then go to the "Status: Task" page and note the displayed "Task distance".
  4. Return to the map page, and make the glider start flying the task (taking off and then crossing the start line and heading toward the turnpoint). In order to more clearly see the problem, pick a speed that gives an estimated task time of at least four minutes.
  5. Wait 30 seconds or more (to help make the problem more apparent) after entering the turnpoint sector. Then turn and fly toward the finish line.
  6. After finishing the task, return to the "Status: Task" page, and note "Speed average", "Estimated task time", and "Task distance".

Expected behavior

I expected "Speed average" (on "Status: Task" page) to be the as-designed task distance (twice the distance from the start/finish point to the turnpoint - measuring from the lats/lons of the task points themselves, not where the glider crossed the start or finish line or where it flew within the turnpoint sector) divided by the actual task time ("Estimated task time" on "Status: Task" page). In my last test case, this would have been... 4.55 miles / 00:04 = 68.3 mph (or as low as 54.6 mph based on my guess - based on observations - that any fractional minute is truncated from "Estimated task time" as displayed, which means the real value could have been as high as 4.999 minutes). The in-program help text when selecting the turnpoint type suggests that my expectation is appropriate. For example, for "FAI quadrant" type, part of the help text is "scored from corner point"; for "Turn point cylinder", "scored from center". For comparison, with a task type of "AAT", all possible turnpoint types' in-program help text contain wording like "scored by farthest point reached in area".

Actual behavior

"Speed average" (on "Status: Task" page) is roughly "Task distance" (on "Status: Task" page), which appears to be longer than the as-designed task distance (and affected by how deeply one flies into the turnpoint sector), divided by the actual task time ("Estimated task time" on "Status: Task" page). In my last test case, this was... 7.65 miles / 00:04 ~ 97.6 mph (if actual time could have been 4.0-4.999 minutes, this calculation could have resulted in any value in the range 91.8-114.8 mph). In other words, it looks like XCSoar calculates this the way it would for an "AAT" type task even though this is an FAI type task.

Do you have any idea what may have caused this?

It appears to me that the root cause might be how "Task distance" is calculated. I'm guessing that "Speed average" is simply "Task distance" divided by "Estimated task time" (at full precision, of course, not in the coarse one-minute precision as shown on the "Status: Task" page). With an FAI type task, the task distance is (should be) always simply the "formal" task length. For example, with an out-and-return task, it's twice the distance from the start/finish point to the turnpoint - measuring from the lats/lons of the task points themselves, not where the glider crossed the start or finish line or where it flew within the turnpoint sector. Every pilot who flies the same FAI task should get the same task distance: exactly the as-designed task length.

Do you have an idea how to solve the issue?

My guess is that this would be fixed by changing "Task distance" to be calculated as described in the previous paragraph (which is how the in-program help text for task point type suggests) when the active task is an FAI type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant