Take the 2-minute tour ×
Bicycles Stack Exchange is a question and answer site for people who build and repair bicycles, people who train cycling, or commute on bicycles. It's 100% free, no registration required.

I'm looking for a piece of software to conduct a local time-trial race. There will be some 50 riders: large enough to make the job of preparing race results with bare pen and paper rather hard and time consuming, but too small to use full-fledged race chips systems.

Riders are going to start with one minute interval and on the finishing line there will be a man announcing time to the operator. So the operator will just have to enter the time of the rider to the program. The program should be able to produce the table of results on the fly as the riders cross the line.

I understand that creating this kind of software is not that hard, but I was just hoping there are readily available freeware solutions that I could use for my event. Please let me know if you ever heard of any.

share|improve this question
    
In 1 hour, I'll have made one in python :) –  Tim Aug 31 at 13:44
    
Yeah, right, I know it's relatively easy to write it myself. But when I start to thinking about all the useful features I'd like to have there, like editing table with results (automatically moving entries if needed), creating printer friendly output, exporting to excel, filtering results according to let's say type of bicycle (road-bike vs aero) or age groups, etc I realize that it may be easier to invest in googling instead :-) –  krakovjak Aug 31 at 14:47
4  
Why not just use a spreadsheet? –  200_success Sep 2 at 13:02

3 Answers 3

This will run in python (only 3.X, not 2.7), a free to install programming language. Simply save the following as a file ending .py - e.g. timetrials.py. Then open IDLE3 (start menu), and open the file (Ctrl+O). Finally, press F5 to start it.

import datetime
from operator import itemgetter

def get_int_input(prompt, min_=0, max_=None):
    """Get a valid integer input."""
    while True:
        try:
            i = int(input(prompt))
        except ValueError:
            print("Please enter an integer.")
        else:
            if min_ is not None and i < min_:
                print("Must be at least {0}.".format(min_))
                continue
            elif max_ is not None and i > max_:
                print("Must be at most {0}.".format(max_))
                continue
            return i

def get_time():
    """"Get a time input as a datetime.time object."""
    h = get_int_input("Hours (0-23): ", max_=23)
    m = get_int_input("Minutes (0-59): ", max_=59)
    s = get_int_input("Seconds (0-59): ", max_=59)
    ms = get_int_input("Milliseconds (0-999): ", max_=999)
    return datetime.time(h, m, s, ms*1000)

def get_results(competitors):
    """Get a dict of finishing times for all competitors."""
    results = {}
    for _ in range(competitors):
        while True:
            competitor = get_int_input("Enter competitor number: ", min_=1, max_=competitors+1)
            if competitor not in results:
                results[competitor] = get_time()
                break
            print("Time already entered.")
        print_results(results)
    return results

def print_results(results):
    """Display the race results in a table, fastest first."""
    linet = '┌' + "─" * 12 + '┬' + '─' * 17 + '┐'
    linec = '├' + "─" * 12 + '┼' + '─' * 17 + '┤'
    lineb = '└' + "─" * 12 + '┴' + '─' * 17 + '┘'
    print(linet)
    print("│ Competitor │ Time (H:M:S)    │")
    for n, t in sorted(results.items(), key=itemgetter(1)):
        print(linec)
        print("│ {0:<10d} │ {1!s:<15} │".format(n, t))
    print(lineb)

def race():
    """Handle race times for a user-specified number of competitors."""
    n = get_int_input("Enter number of competitors (2-): ", min_=2)
    results = get_results(n)

if __name__ == "__main__":
    race()

When everyone has finished, it will look something like this:

┌──────────────┬───────────────┐  
│  Con Num     │ Time H:M:S    │  
├──────────────┼───────────────┤  
│  1           │ 5:4:3.2       │  
├──────────────┼───────────────┤  
│  2           │ 8:7:6.5       │  
├──────────────┼───────────────┤  
│  3           │ 2:2:2.2       │  
└──────────────┴───────────────┘  
share|improve this answer
    
O_o Thank you for effort :-) –  krakovjak Aug 31 at 14:51
3  
All well and good, but buying a commercial package at least gives you someone to moan to when you find a bug. –  PeteH Aug 31 at 19:22
3  
Feel free to moan at me here, I'm sad enough to always be on SE! –  Tim Aug 31 at 19:26
2  
Nice effort! You should consider running this past codereview.stackexchange.com, though - you aren't wholly compliant with the style guide and there's a lot of repetition (e.g. consider adding a function def get_int_input(prompt, min_=None, max_=None):). Also, strftime would save you some work. –  jonrsharpe Aug 31 at 21:28
    
@jon just doing that now... It's tricky because of the variations... 15 mins ;) –  Tim Aug 31 at 21:37

One option is RaceSplitter. This is an iOS app, costs $35. You will need a suitable iPad, iPhone or iPod Touch to run it on.

You can enter a start list in advance. Then during the race, you just have to enter the rider number as they cross the finish line, and it will record their time. You can then publish the results on the website, and export to Excel etc.

I've not tried this myself, but I have seen it in use at a few local races. It seems to work fine for timing, and they have got the results online shortly after the race.

share|improve this answer
    
This looks like exactly what I need! Thank you! –  krakovjak Sep 1 at 18:34

We've used an app for android phones made by Liuto. It was great, easy to learn/use and cheap --only $1.11. Basically, when each rider goes off by start number, you tap their corresponding number on their return and the calculation of their time versus overall elapsed time is complete. Snap!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.