Turbo87 / ogn-web-viewer

OpenGliderNet WebViewer
https://ogn.cloud/
Apache License 2.0
10 stars 4 forks source link

AAT: current speed not shown #250

Open VladimirVLF opened 4 years ago

VladimirVLF commented 4 years ago

When setting an AAT task, current task speeds are not shown for gliders. Start time and distances are shown correctly, some points are also shown (not sure if sane values), but current speeds are empty. However, when gliders finish the task, final speeds are shown with quite correct values.

VladimirVLF commented 4 years ago

Not sure if I get the code right, this what I found.

Here in the table script https://github.com/Turbo87/ogn-web-viewer/blob/350989cc0638e3e3146bc3ecd2a7f0e59f7300b0/app/components/score-table.js#L125

...the speed comes from createInitialDayResult() because of here https://github.com/Turbo87/ogn-web-viewer/blob/350989cc0638e3e3146bc3ecd2a7f0e59f7300b0/app/components/score-table.js#L88-L91

... and createInitialDayResult() sets speed to zero since task not completed

  // Finisher’s Display Speed.
  _V = completed ? D / (T / 3600) : 0;

this was from aeroscore: https://github.com/Turbo87/aeroscore/blob/263ea66e4d80d9850dde3b652c9e47f65da30101/src/scoring.ts#L65

Seems like, when the task is AAT createIntermediateDayResult() should be used instead of createInitialDayResult() to calculate correct speed above in dayResult in the table update() function.

Turbo87 commented 4 years ago

this is currently not shown on purpose. the intermediate result for AATs is misleading because it does not factor in the min/max distances and the minimum time. e.g. based on the current speed we need to calculate if there is actually enough max distance left to keep this speed up. similarly if with the current speed the pilot would arrive early, we will need to factor that in.

kedder commented 4 years ago

@Turbo87 IMO it is better to show the current speed with some notes rather than not showing it at all. I had to manually divide distance to time on calculator to understand who is leading. It is still an actual speed, even though it can be corrected after the finish is detected.

Turbo87 commented 4 years ago

yeah, that's probably true. should be good enough until the other stuff is implemented.

VladimirVLF commented 4 years ago

The speed task speeds are also not perfect anyways, especially when tracker signals are unreliable (e.g. start with touching the start sector, or bad sognal near turn points), so people aleady get used to these speeds being approximate. It wont hurt to show AAT speed estimation, I think...