Sports Timing System - Inside View

Hello dear readers. Surely, many of you have been or are involved in sports. This is a great hobby and, in general, good for health. I spent most of my childhood at orienteering training camps. Alas, I did not achieve great results in sports, but I really did not want to part with him (with sports). And then I began to participate in the organization of sports competitions. Now this is not a job, but rather a hobby. And today I would like to tell you about my role in organizing these competitions.

In this article I will tell

  • About what sports timing is on the example of a ski marathon
  • A bit about the equipment we use
  • About refereeing software

There will also be several large photographs and pictures from the thick of events.
Sometimes I will use the term “ judging ”. For us, this is a familiar word that means " monitoring the progress of a sports competition ." It has nothing to do with the state justice body.

Our role is timing





People have always loved to compete. In all ages, they find out who is faster, who is stronger and more enduring.
For the objective identification of the strongest, three things are always needed :

  1. Competition rules or regulations
  2. Equal conditions for all participants
  3. An independent and non-biased third party is a sports referee who records the results of the competition

The central place in the judging of many cyclic sports is timing , that is, the determination of the time taken by each of the participants .

We hold sports competitions in various sports: cycling, multisport, orienteering and even city quests, but always the most vivid impressions remain from the organization of skiing (here we are talking about cross-country skiing).

Every year, mass skiing is becoming more popular and attracting an increasing number of participants. Several thousand people from all over Russia and sometimes Europe come to the race to find out who is cooler at distances of 10, 25 and 50 kilometers. In Russia, about 20 major ski marathons take place every year.


Ski marathon "Holiday of the North" in Murmansk.

I was always surprised and admired by people who fly 10 thousand kilometers on an airplane to participate in such a race. They pay a lot of money for flights, accommodation and for the race itself.

That is why the quality of the competition and the service provided must be high, preliminary results of the race should appear as quickly as possible, there should be a minimum of errors. The results of the race are the final part of the event and the second (after the race itself) for which athletes come.

From the foregoing, we conclude: timing is one of the most important parts of a sporting event. High accuracy, discipline and speed of each member of the timing team is required.

What's so complicated?



Photo of Maria Shalneva from the marathon in Dubna 02/14/2015

What's so difficult to measure the time of athletes and print the final table of results on the printer? "- the reader will ask. The thing is that the work of the timing team takes place in a fairly stressful environment.

Here are a few reasons for this:

  • The whole event is very compressed in time. There are only a few hours for which a lot of things have to be done: to build a referee campus, establish equipment, set up a network, prepare a base of participants for the referee program.
  • All the action takes place on the street, and in the case of ski marathons, also in the cold. Around is very loud music and the voice of the commentator: sometimes one’s own thoughts are not even heard.
  • There is no permission for a mistake, since one small mistake entails a barrage of more serious problems. If an error crept into the beginning of the results protocol, the wrong participants can award medals and expensive prizes from sponsors.
  • At the most inopportune moment, the law of meanness is triggered: the router breaks, readers do not respond, the generator or chainsaw does not start / breaks, or Windows gives a blue screen of death
  • The idiotic behavior of individual participants, and sometimes the organizers. People consider it possible to intervene in the work of the timing team, distract with questions and insist on solving their own problems.
  • The number of participants in the race often surpasses a couple of thousand people. An error in the calculation of results will entail the discontent of many.

The equipment we use



The inclusion of antennas in an RFID reader. The

number of participants in a race of two to five thousand people implies the mandatory use of electronic timing equipment. If we use a watch, pencil and paper to calculate the results, then they will have to wait "at least forever."

The task is as follows: it is necessary to automatically determine the exact time for each participant to pass through a certain point at a distance and save the pair “participant number - time of crossing the finish line” to the database.

Initially, we considered two solutions, one of which immediately disappeared due to its imperfection and complexity of implementation.

The first option (which we immediately refused) is recognition of the numbers of participants in the photoor video taken at the intersection with an automatic camera or camera. This is our valiant traffic police - they remove, recognize, send letters with fines. Example: a skier drove through the finish line, crossed the “ray”, which is connected to the camera. The photo is automatically recognized immediately, the time and number from it enters the database. You can judge for yourself the complexity of development and the probable problems of such a system. when using it at public events.



The second option (which we use) is the use of RFID tags sewn into the participants' jerseys . The principle of operation of radio frequency identification, I copied from Wikipedia:
An RF tag is installed on the object to be controlled. When an object with a tag enters the reader’s coverage area, the reader receives information about the object contained in the tag from the tag and transfers it to the computing device.

You can understand the working scheme from the photo below:



A participant passes by antennas, a passive (i.e. without his own power source) RFID tag in the participant’s shirt picks up the electromagnetic waves of the reader and sends him a response signal. Further - a matter of technology in the literal and figurative sense. You must select the answer with the maximum signal level (this is done by the software in the reader) and send the “time-number” packet over the network to the server.

The technology works well. The problem of “skipping” the participants is mainly associated with “elbows pressed to the body” (the human body shields the signal) and insufficient power of the passive tags (using active tags is very expensive for mass marathons).

First of all, we install antennas and readers at control points (usually this is one intermediate point and finish).


Scheme (top view) of the finish town of the ski marathon. The

wires have to be buried in the snow, because they can be hooked with skis. Most often , it is very difficult to dig snow , so a chainsaw enters the fray.



Then we pull the wires: all readers, an IP camera, office computers, a printer must be assembled into one network.



We put a gas heating pad in the tent, because the risk of freezing and getting sick while sitting at a computer in the cold is very high.


Photo from the intermediate cut-off

Timekeeping and Refereeing Software


The main task of the timing team is upon the first requirement to provide the chief judge of the competition with relevant and error-free protocols of the results of the race. In simple terms, the results protocol is a table of race participants divided into age groups and sorted by distance. It sounds simple enough and it seems you can do just Excel for creating such a table.

Some old-timers do use Excel to judge such starts. They have file templates for every type of race, a debugged collection of macros, very strict and strict rules for working. In my opinion, this is difficult, inconvenient and very restricts the use of additional goodies (tell me, for example, send text messages via Excel to the participants who have just finished, make GPS broadcasts on a large monitor in the competition center and broadcast the results online) ?)

We decided to go ahead and made a program . More precisely, not even a program, but a web application. Openventor(as we called it) is written in PHP (here some readers should frown and slightly shake their heads). A rather strange choice for writing highly specific software, which should also work with equipment, say skeptics.



We chose the choice of technology stack for development consciously and here are a few reasons:

  1. The possibilities that PHP, HTML5 and JS give us are quite enough to implement our plans.
  2. No need to compile every time . Alas, often I have to edit the code right during the race, so to speak on the "armor of a burning tank." At this moment, the ability to add 2 lines of code, and by pressing F5 in the browser to get the result is a very good opportunity
  3. PHP is very popular , which means that you can find a cheap programmer to write plugins (more on that below).
  4. No need to install software on every computer. At that moment, the chief judge of the competition or the commentator wants to “ see on their macbook how the participants will finish ”, just plug it into the network and open the desired page in the browser. And when you need to promptly send five girls to register new participants - the implementation of OpenEventor as a web application seems wise.
  5. Our readers work over the network . IP camera, of course, too. Therefore, we can work with equipment quite comfortably in PHP.
  6. I unfortunately do not know other programming languages, as good as PHP. Perhaps we would have made a program in Java or C # if someone from our team knew Java or C #.

For those who are not aware that you can " work in a browser without the Internet ", this is done like this:

  1. Computers are combined into one network using a switch and twisted pair cable or using a Wi-Fi router.
  2. On one of the computers we run the web server (we use Maxim Arkhipov's Openhserver ArhMax )
  3. All who need access to the program simply open a browser and enter an address there, such as 192.168.1.15 and get to the main page of OpenEventor.

To store data , the SQLite database was immediately selected . For those who never used SQLite - I highly recommend to adopt ( article on Habré ). This is a very reliable and very fast database. A special server is not needed for it.

For us, the SQLite concept turned out to be ideal: each event (marathon, race, or something else) is a separate database. Each SQLite database is a separate * .db file. Old databases are easy to archive so that they do not take up space and are not lost, and the current ones are easy to transfer if there is such a need. Working with SQLite in PHP is very simple and safe, it is supported by the PDO interface. If you suddenly have to do something super complex that cannot be done by OpenEventor, you can write a SQL query by hand.


Split monitor (left) and the Plugins section (right)

As I mentioned above, the system is expanded with plugins.
To make a universal system for refereeing sports competitions is not realistic.

At first, each organizer has their own wishes and requirements regarding how to judge. And if there are any standards in skiing, then in sports such as multi-race, you can think of only one hundred thousand ways in which parameters to form the final protocol.

Secondly , it is not logical to include such minor things as sending SMS and automatic publication of photos from the finish line (which an automatic camera makes).

That is why only the basic functionality is implemented in the program: basic work with participants, groups, teams and splits, and all additional chips, we and everyone who wants, can add on their own.

A little about the device program


There are two key entities in the system:

  • Participant - has such parameters as gender, year of birth, group (the class in which he competes), last name, first name, number (the one that is attached to the chest or leg), and several more.
  • Split is a fact and time of crossing a certain point at a distance by a certain participant

The rest (teams, groups, distances) - are secondary and I will not talk about them for a long time. At any sporting event where athletes compete individually, there is a division into teams (for example: by city or sports club) and group (for example: by age and gender). A distance in a cyclic sport (running, skiing, cycling, orienteering, etc.) is the correct split sequence (see above) that must be “collected” by the participant during the race.

Example: A skier from the age group M35 (male 35 years old) overcomes a distance of 50 km, which consists of 5 circles. He passes a ten-kilometer circle five times, 4 times an intermediate cut-off, and a fifth time a finish cut-off elsewhere on the track. For a skier it’s just 50 kilometers (although, of course, it’s very difficult :). For me, as for a timekeeper, this is the distance lap, lap, lap, lap, finish .

Our main work during the race is to control the operation of the equipment and very quickly correct errors. Readers sometimes skip participants. Usually this is 3 out of 100 splits. Our task is to determine “who didn’t catch”, calculate the split time (for example, watch a saved video from an ip camera that records video for 4 hours). Sometimes you even have to use a paper take.


In the split monitor, we immediately see the “problem” participants

To solve the problem with omissions is not difficult. It is much more difficult to determine in time what this problem is. That’s why we made a split monitor: this is a plugin that displays the most current information about splits. The plugin analyzes the participant’s splits, comparing with a given distance finds out if there is a problem. At this moment, you can still understand what happened: the skier just accidentally covered his chips (rfid-tags) with his elbows and “didn’t catch” at the last intermediate finish, left the race after the second round and made a mistake by turning and drove only 10 km instead of 25 km. It will not be realistic to understand further: he will pack his things and leave home, and then he will grumble all week at the forum that he was disqualified for no



reason ... The outcome of an event is always a protocol of results by which the winners are awarded.


Photo of Maria Shalneva from the marathon in Dubna 02/14/2015

Thanks for attention


Thanks to everyone who read to the end. If the article seemed interesting to you, I will definitely write a few more, for example, about the specifics and software for organizing city quests, about the use of technologies in orienteering.

Also popular now: