esitarski / CrossMgr

Cyclo Cross Management Application
MIT License
41 stars 21 forks source link

Import time trial start times as part of linking external Excel sheet #75

Open kimble4 opened 3 years ago

kimble4 commented 3 years ago

Minor tweak, this:

When running a time trial and using an external Excel sheet to provide rider category data, it seems strange that CrossMgr can't read the time trial start times as part of the Link external Excel sheet process. You have to go to the DataMgmt menu and do it as a separate step, even when the data is in the same sheet. This is unintuitive, as changes to the start times aren't reflected automatically in CrossMgr when the sheet is edited, as changes to rider names and categories would be.

esitarski commented 3 years ago

The short answer is that this is supported (and very poorly documented). In your Excel sheet, create a column called "StartTime". It has to be spelled that way exactly, including upper and lower case. It also has to be the first column. Now the start times will be auto-imported like any other field.

Notes:

CrossMgr expects the entries in this column to be proper "Excel" times, that is, fractions of a day. That is, one minute = 1/(24 60), one second = 1/(24 60 60). If you set Excel to a time format on that column it will do the right thing when you enter data into the cell. However, you must be aware of the fractions when using formulas. For example, if A2 has the formula =A1+1/(24 60), this will add one minute to the previous entry's start time. The StartTime must also be in "race time", that is, the time after the start of the TT. Not "time of day". For example, be aware that a start times like "10:01:00" does not mean one minute after ten in the morning, rather, it means 10 hours and one minute after the race start.

Pro tip: Don't make the first time 00:00, but rather, 01:00, 02:00 (or even 05:00). This gives you some time after the "start" to get everyone organized and in position. It also gives the first rider a countdown if you are using the TTCountdown web page.

Explanation:

This is a case of "things are the way they are because they got that way", and it rightfully feels pretty hacky. The first CrossMgr users wanted to keep a "master" Excel sheet with all rider information and a separate sheet with the start times. Over time this usage changed (especially with RaceDB, where the rider info comes from the database).

I will revisit the documentation to see if it can be improved. Also, it is a bit restrictive to require "StartTime" - perhaps some other aliases like "Start", "Start Time" and making it case insensitive could be added.

kimble4 commented 3 years ago

Interesting, I was doing all this, except the column header was "Start Time" as per the instructions for loading in a separate sheet, and it wasn't the first column.

(Having finally manage to herd the cats at the British Human Power Club to line up in a pre-determined order for a fully automated time trial, we were delighted with how smoothly this all Just Worked. Much better than manual mode, as it means we can use our RFID system, and the punters appreciate the TTCountdown page.)

cclague commented 3 years ago

Is it possible to include start times in the initialisation of the race in RaceDB? (init_prereg). At the moment it's just ignoring my data:

image