Giter Club home page Giter Club logo

Comments (7)

Topvennie avatar Topvennie commented on August 20, 2024

eac0798

from telraam.

redfast00 avatar redfast00 commented on August 20, 2024

Ziet er goed uit, merci!

from telraam.

redfast00 avatar redfast00 commented on August 20, 2024

On second thought, it might not be ideal to delete all laps and then save them again: this does a lot of writes to the database, and will keep increasing lap ids. Do you have a suggestion for a better approach? I think maybe you can compare the laps by their timestamp (if they lie in a 5 second interval, they are the same, so you can just edit their timestamp), and only insert new laps and delete unneeded laps?

Additionally, if any laps other than the last one is edited, a lap is deleted or there's an insertion between already existing laps, maybe log this, since this would be strange (will happen in the case of a station getting disconnected and reconnected later)

from telraam.

redfast00 avatar redfast00 commented on August 20, 2024

(Also, pls werk met pull requests, dat maakt het makkelijker om comments toe te voegen op een specifieke lijn)

from telraam.

Topvennie avatar Topvennie commented on August 20, 2024

I meant to work with a pull request but because of an oversight it immediately got pushed to the development branch my bad.

The save method is indeed not ideal.
I'm working on a new version that only fetches the new detections instead of going through all the detections. Since it only calculates the new laps it'll only add those to the db.

from telraam.

redfast00 avatar redfast00 commented on August 20, 2024

Yeah no worries about the accidental push :) I've enabled branch protection, this was misconfigured.

The version that only fetches new detection sounds more efficient :) There are however some pitfalls/edge cases:

  • Telraam may be restarted during the event
  • If there are two detections, A and B, and A has a higher detection id then B, then this does not mean that A's timestamp is after B.
    • common case: the fetcher that fetches the detections from the stations does not run at the same time for every station, so detections from one station may be inserted later than detections from another station, even if the detections happened earlier
    • less common case: some stations can become temporarily disconnected, for example by the Ethernet cable getting driven over, while the detections from other stations are still getting inserted. After the connection is restored, the detections from the disconnected stations will be pulled in, maybe leading to different behaviour of the lapper. If the algorithm runs only with the newly inserted detections, so without the detections that are in time around the newly inserted detections, strange things will happen.

from telraam.

redfast00 avatar redfast00 commented on August 20, 2024

This was done, thanks @Topvennie

from telraam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.