*/current, location data
API with processed real-time geolocation data, for TV graphics, speed monitor, gap time calculation, ...

Request

URL https://racemap.com/api/data/v1/:eventId/current Method GET

Optional query parameters

Set query parameters when calling the API independent from the settings of the visualization.
deviceId
liveDelay
currentSpeedDuration
interpolation
Comparison
interpolation=true
interpolation=false
Use case
Values changing smoothly with each call
Latest values with a minimum delay
Calculation
Linear interpolation between latest coordinate and the one before
Latest coordinate without interpolation
Refresh rate
Up to 1 sec
Report interval of GPS device
Recommended liveDelay
5 sec + report interval of GPS device
5 sec minimum
You can call the same API endpoint with different query parameters at the same time. Combine queries with & in one call eg. https://racemap.com/api/data/v1/61a21210e5d45d000199f7d9/current?liveDelay=600&interpolation=false&currentSpeedDuration=600&deviceId=61a2122f181c0a3166b538bb

Response

Event object

Field
Description [unit]
Sample
name
Name of event
"100km Duathlon"
location
Location
"Dresden"
startTime
Start time in UTC
"2022-01-24T15:00:10.000Z"
endTime
End time in UTC
"2022-01-24T22:59:45.000Z"
starters
Array for participant objects

Participant object

Field
Description [unit]
Sample
id
Unique Racemap ID of participant
"61a2122f181c0a0ff7b53765"
importId
User-defined ID with imported participant data, Generic API (importId) or RACE|RESULT API (Id)
"UniqueImportId_1"
startNumber
Bib number
"001"
name
Name
"CLV Megware"
current
Object for real-time location data

Current object

  • current-object provides the latest data
  • (*) calculated only for events with a shadowtrack
Field
Description [unit]
Sample
time
Timestamp in UTC when geolocation was recorded, if interpolation=true then linear interpolation between the latest two points
"2022-01-24T16:33:47.012Z"
lng
Current longitude of participant
13.727678288
lat
Latitude
50.976534023
elv
Total elevation gain on shadowtrack [m]
85.2
fromStart *
Distance from first geolocation of shadowtrack along shadowtrack [m]
9962.6826
toFinish *
Distance to last geolocation of shadowtrack along shadowtrack [m]
89097.3173
eta *
Estimated time of arrival [s], time to reach last geolocation of shadowtrack, prediction with speed
16897.77
speed
Average speed [m/s] depending on currentSpeedDuration. If event has a shadowtrack, than projection on shadowtrack.
5.2727
distanceToShadowTrack *
Distance from shadowtrack [m] if more than 100 m
175.9 or null
gapAverage *
Duration [s] to reach current fromStart value of reference deviceId, prediction with reference average speed for current segment between device and reference device. Devices in front of reference: If fromStart of a device is greater than fromStart of the reference device then null.
2360.36 or null
gap *
Duration [s] to reach current fromStart value of the leader, prediction with speed value of leader, if speed < 1 km/h then prediction with default speed value of the event, leader: device with smallest toFinish value attention: Each time a leader reaches the finish the device closest to finish becomes the new leader. The speed value of the next leader may impact fluctuating gap values.
1205.68

Sample response

1
{
2
"name": "Sample repeat | 100km Duathlon ",
3
"location": "🇩🇪 Dresden",
4
"startTime": "2022-01-24T15:00:10.000Z",
5
"endTime": "2022-01-24T22:59:45.000Z",
6
"starters": [
7
{
8
"id": "61a2122f181c0a0ff7b53765",
9
"importId": "UniqueImportId_1",
10
"startNumber": "001",
11
"name": "🔥 Flaming 🔥 Sideburns 🔥",
12
"current": {
13
"time": "2022-01-24T16:33:47.012Z",
14
"lng": 13.727678288,
15
"lat": 50.976534023999996,
16
"elv": 85.2,
17
"fromStart": 9962.682666666668,
18
"toFinish": 89097.31733333334,
19
"eta": 16897.77,
20
"speed": 5.2727272727272725,
21
"distanceToShadowTrack": null,
22
"gapAverage": 2360.36,
23
"gap": 1205.68
24
}
25
},
26
{
27
"id": "61a2122f181c0abbacb538cd",
28
"importId": "UniqueImportId_41",
29
"startNumber": "045",
30
"name": "Greyhound-Express",
31
"current": null
32
},
33
{
34
"id": "61a21230181c0a0a40b53920",
35
"importId": "UniqueImportId_50",
36
"startNumber": "📢",
37
"name": "Vorausfahrer",
38
"current": {
39
"time": "2022-01-24T16:33:47.012Z",
40
"lng": 13.81113,
41
"lat": 50.93047,
42
"elv": 529.5,
43
"fromStart": 20010,
44
"toFinish": 79050,
45
"eta": null,
46
"speed": 0,
47
"distanceToShadowTrack": null,
48
"gapAverage": null,
49
"gap": 0
50
}
51
}
52
]
53
}
Copied!

Subsequent calculations

You can calculate on your side using the */current API.
Gap distance between two participants: fromStart (participant 1) - fromStart (participant 2)
Gap duration between two participants:
  • option 1: gapAverage (participant 2) - gapAverage (participant 1) => value with flatten peaks
  • option 2: eta (participant 2) - eta (participant 1)
  • option 3: gap (participant 2) - gap (participant 1)
Identify the leader: the smallest value of toFinish