jeffpiazza / derbynet

Open-source Pinewood Derby race management, built around a web server and database
MIT License
98 stars 72 forks source link

Small Issue: Rounding at thousands decimal #111

Open heatvent opened 4 years ago

heatvent commented 4 years ago

So we got our track setup with the Champ timer and did a number of test heats I did notice a difference between the timer results and DerbyNet at the 3rd decimal. I saw this before using a homemade timer I have for a 2 lane track using an arduino. Basically, I believe DerbyNet is "rounding" the result where the Champ is "cutting off" the decimals past 3 decimals, similar to what calculators do. The reason I think this is I had to add rounding to my homemade timer to match DerbyNet.

I only bring this up because I believe the miscjunk timer chops off as well (and so was I using the arduino). So I am not sure if there are different conventions from timer to timer or if DerbyNet is different that what is normally done. This is a very minimal impact of course on any results. I am just expecting someone will point it out thinking the software is picking up the results wrong.

jeffpiazza commented 2 months ago

DerbyNet accepts whatever the timer reports, without trying to round or manipulate the value. If the timer and DetbyNet display different results, I'd most strongly expect that the timer is reporting different values on the serial port than on whatever display is attached to the timer.

The server-side timer log(s) should include the details of the conversation between the timer and the host computer; you should be able to trace down any discrepancy by looking there.

DerbyNet does offer a choice to display 4 digits after the decimal if you think the timer is reporting higher-precision values.