12urenloop / Telraam

New and hopefully improved application to count laps of the 12urenloop event
MIT License
6 stars 2 forks source link

Lapper and positioner don't agree #144

Open redfast00 opened 5 months ago

redfast00 commented 5 months ago

Currently, the lapper (robust lapper) and posititioner (nostradamus) don't have the same result at the same moment: the lapper always runs on all data, while the positioner is incremental (only calculates on new data). The lapper has to calculate a lot more, and thus takes about 5 seconds per lap calculation, so can't be run as fast as the positioner (which runs every 500ms).

Because they don't agree on position, the positioner sometimes says the lap has 100% progress, but no new lap is added until the lap progress is 25% (of the next lap). This looks weird in the visualisation, so we can't show them at the same time.

redfast00 commented 5 months ago

A possible solution could be to integrate the lapper and positioner into one class (and make it incremental), but then we need to think about recovering from disconnected stations; position data does not really matter, but lap count does. Some conditions we need to think about: