> For the complete documentation index, see [llms.txt](https://docs.racemap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.racemap.com/prediction/timekeeping/other-timingsystem.md).

# Other timing system

Predictive live tracking with reads from any timing system.

Your timing system provides the information of **UTC timestamps**, **chip IDs** (or transponder IDs), and ideally **GEO locations and** you can send this data to RACEMAP server.

When a participant passes a decoder, the timing system generates data including the **timestamp** and the **ID**. You can format this data as a **JSON array** (as shown below) and send it to our servers.

You can use any programming language that supports **HTTPS-based POST requests with JSON bodies**. To test the approach, follow the steps below or set up **permanent forwarding** within your timing system.

For this setup, a **programmer** or someone with **technical expertise** is recommended. However, if you need assistance, reach out to us — we support you build a **reliable, and easy-to-use solution**, similar to our solution with RACE RESULT.

Therr are two scenarios **RACEMAP** receives data from a timekeeping software.

1. Recommended: [Reads](/glossary.md#read) ([detections](/glossary.md#read)) include the reader's GEO location.
2. Reads without the GEO location. In that case, the [readers' locations must be set in RACEMAP](#set-readers-locations) under Reader locations.

### HTTP Request

**URL** `https://racemap.com/services/trackping/api/v1/timing_input/pings`

**Method** `POST`

#### [Reads](/glossary.md#read) object

A read can have the following data fields. Some of them are required, some are optional.

<table data-full-width="false"><thead><tr><th width="169">Field</th><th width="311">Description</th><th width="294">Sample</th><th data-hidden></th></tr></thead><tbody><tr><td><code>timingId</code></td><td>Unique ID of the reader</td><td><code>"XF32098"</code> or <code>"_8nx7uoyun"</code></td><td></td></tr><tr><td><code>timingName</code> *</td><td>Name of reader in timing software</td><td><code>"5K-split"</code> or <code>"Start II"</code></td><td></td></tr><tr><td><code>chipId</code></td><td>Transponder ID</td><td><code>"RRPing_ZDKAR32"</code> or <code>"RRPing_70761"</code> or <code>"HH32098"</code></td><td></td></tr><tr><td><code>timestamp</code></td><td><a href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">Timestamp in UTC</a> when the reader detects the transponder</td><td><code>"2023-11-09T16:35:05.248Z"</code></td><td></td></tr><tr><td><code>lat</code> **</td><td>Latitude of the reader</td><td><code>51.5074</code></td><td></td></tr><tr><td><code>lng</code> **</td><td>Longitude of the reader</td><td><code>13.7276</code></td><td></td></tr></tbody></table>

(\*) Optional parameter without impact on processing the reads in RACEMAP.

(\*\*) If unavailable you have to set GEO locations for each reader in the [RACEMAP](https://racemap.com/admin/events) map editor

### Examples

The examples demonstrate the process of

* converting your timing data into **RACEMAP**-compatible reads,
* sending the data to our server, and
* testing access using the API token.

Once your timing data is successfully forwarded to RACEMAP, we can provide further support to help you build a reliable integration.

{% tabs %}
{% tab title="1. Using VS Code" %}
To test this example, use the [VS Code](https://code.visualstudio.com/) editor.

* Install VS Code on your computer.
* Install the [Rest Client Extension](vscode:extension/humao.rest-client).
* Save the below sample into a file with the name `test.rest` .
* Open the file in VS Code.
* Paste your **API token**.
* Send the HTTP request to our server.
* Check the **prediction section** of your event in RACEMAP for received reads.

In the 1st sample, the GEO locations of each reader are defined. The `timingId` identifies the reader and does not influence data processing in the RACEMAP backend. You can use these IDs to verify whether your data was correctly received by RACEMAP.

```json
POST https://racemap.com/services/trackping/api/v1/timing_input/pings
Content-Type: application/json
authorization: Bearer [Place your API token here]

[
  {
    "timingId": "XF32098",
    "timingName": "Start",
    "chipId": "HH32097",
    "timestamp": "2023-11-09T16:31:07.248Z",
    "lat": 51.5074,
    "lng": 13.7386
  },
  {
    "timingId": "XF32099",
    "timingName": "Start II",
    "chipId": "HH32098",
    "timestamp": "2023-11-09T16:31:05.248Z",
    "lat": 51.5074,
    "lng": 13.7386
  },
  {
    "timingId": "XF32100",
    "chipId": "HH32099",
    "timestamp": "2023-11-09T16:32:04.248Z",
    "lat": 51.5074,
    "lng": 13.7386
  }
]
```

In the 2nd sample, the GEO locations of the readers are not defined. You can manually set them in RACEMAP. For each `timingId`, you can define a GEO location under [Reader locations](#set-readers-locations) in the Prediction tab of your event. Our prediction algorithm will then use these manually assigned locations.

However, this method is not recommended, as errors may occur if incorrect locations are defined.

<pre class="language-json"><code class="lang-json"><strong>POST https://racemap.com/services/trackping/api/v1/timing_input/pings
</strong>Content-Type: application/json
authorization: Bearer [Place your API token here]

[
  {
    "timingId": "XF32098",
    "timingName": "Start",
    "chipId": "HH32097",
    "timestamp": "2023-11-09T16:31:07.248Z"
  },
  {
    "timingId": "XF32099",
    "timingName": "Start II",
    "chipId": "HH32098",
    "timestamp": "2023-11-09T16:31:05.248Z",
  },
  {
    "timingId": "XF32100",
    "chipId": "HH32099",
    "timestamp": "2023-11-09T16:32:04.248Z",
  }
]
</code></pre>

{% endtab %}

{% tab title="2. Using Python" %}
Python Code for Sending Timing Data (with GEO locations)

Setup Instructions:

* Install [**VS Code** ](https://code.visualstudio.com/)on your computer.
* Install the [**Python extension**](vscode:extension/ms-python.python) in VS Code.
* Install the `requests` library if not already installed:
* Save the content below as `test.py`.
* Replace `YOUR_API_TOKEN` with your actual API token.
* Run the script in VS Code.
* On success `response.status_code` should be 200.
* Check the **prediction section** of your event in Racemap for received reads.

```python
import requests

# API Endpoint
url = "https://racemap.com/services/trackping/api/v1/timing_input/pings"

# API Token (Replace with your actual token)
api_token = "YOUR_API_TOKEN"

# Headers
headers = {
    "Content-Type": "application/json",
    "authorization": f"Bearer {api_token}"
}

# Timing data with GEO locations
data_with_geo = [
    {
        "timingId": "XF32098",
        "timingName": "Start",
        "chipId": "HH32097",
        "timestamp": "2023-11-09T16:31:07.248Z",
        "lat": 51.5074,
        "lng": 13.7386
    },
    {
        "timingId": "XF32099",
        "timingName": "Start II",
        "chipId": "HH32098",
        "timestamp": "2023-11-09T16:31:05.248Z",
        "lat": 51.5074,
        "lng": 13.7386
    },
    {
        "timingId": "XF32100",
        "chipId": "HH32099",
        "timestamp": "2023-11-09T16:32:04.248Z",
        "lat": 51.5074,
        "lng": 13.7386
    }
]

# Sending request
response = requests.post(url, json=data_with_geo, headers=headers)

# Output response
print(f"Status Code: {response.status_code}")
print(f"Response: {response.text}")

```

Python Code for Sending Timing Data (without GEO locations)

```python
import requests

# API Endpoint
url = "https://racemap.com/services/trackping/api/v1/timing_input/pings"

# API Token (Replace with your actual token)
api_token = "YOUR_API_TOKEN"

# Headers
headers = {
    "Content-Type": "application/json",
    "authorization": f"Bearer {api_token}"
}

# Timing data without GEO locations
data_with_geo = [
    {
        "timingId": "XF32098",
        "timingName": "Start",
        "chipId": "HH32097",
        "timestamp": "2023-11-09T16:31:07.248Z"
    },
    {
        "timingId": "XF32099",
        "timingName": "Start II",
        "chipId": "HH32098",
        "timestamp": "2023-11-09T16:31:05.248Z"
    },
    {
        "timingId": "XF32100",
        "chipId": "HH32099",
        "timestamp": "2023-11-09T16:32:04.248Z"
    }
]

# Sending request
response = requests.post(url, json=data_with_geo, headers=headers)

# Output response
print(f"Status Code: {response.status_code}")
print(f"Response: {response.text}")

```

{% endtab %}
{% endtabs %}

### **Response**

If everything is correct the HTTP code 200 is returned.

### **Set readers' locations**

Case 2, if reads are sent without coordinates, tell RACEMAP where each reader stands. Open the **Prediction** tab of your event, sub-tab **Status**, and choose your timing system. The section **Reader locations** appears below it.

{% stepper %}
{% step %}

## Set the shadowtrack

Upload the race track and set it as the [shadowtrack of the race](/live-tracking/shadowtrack.md#shadowtrack). Reader locations are placed next to it.
{% endstep %}

{% step %}

## Add a location

Enter the distance along the track, e.g. `5` km, and click **Add at distance**. The location is placed on the shadowtrack. Or click **Add on map** and click where the hardware stands.
{% endstep %}

{% step %}

## Assign the reader IDs

Enter the `timingId` of every reader at this location. Readers that already sent reads but have no location are suggested. Each ID shows when its last read arrived.
{% endstep %}

{% step %}

## Move it if needed

Drag the location to where the hardware really stands, e.g. beside the track. A location outside the mapping distance corridor is marked: its reads are ignored.
{% endstep %}
{% endstepper %}

One location can hold several reader IDs, e.g. all antennas of one decoder. One reader ID can only be at one location.

Note: If a single reader is used for multiple detections (e.g., timing a lap race at 5K and 10K), add its location only once. On a lap course the prediction maps that location to every lap.

{% hint style="info" %}
Splits no longer carry reader IDs. A split is a [timekeeping point](/glossary.md#timekeeping-point) for the leaderboard; a [reader location](/glossary.md#reader-location) says where the hardware stands.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.racemap.com/prediction/timekeeping/other-timingsystem.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
