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

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

Set query parameters when calling the API.
deviceId
liveDelay
currentSpeedDuration
interpolation
  • Duration in seconds to average the speed value in the API. If currentSpeedDuration is set to 120, then the average speed of the last 2 minutes is calculated.
  • Default: ten times the interpolation interval. The default interpolation interval is 10, therefore the default currentSpeedDuration is 100. If the interpolation interval is set to 2, then the currentSpeedDuration is 20.
  • Maximum value: 1800
  • String to be added to API: ?currentSpeedDuration=120
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

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, step width among both coordinates according to interpolation interval
Latest coordinate without interpolation
Refresh rate
Up to 1 sec
Report interval of GPS device
Recommended interpolation interval
report interval of GPS device
no effect
Recommended liveDelay
5 sec + interpolation interval
5 sec minimum
If eta, gap, gapAverage values are still fluctuating too much you can increase the currentSpeedDuration parameter in your query.

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

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" or "null" if no importId exists
startNumber
Bib number
"001"
name
Name
"CLV Megware"
current
Object for real-time location data
null if no locations within startTime and endTime

  • current-object provides the latest data
  • (*) calculated only for events with a shadowtrack, projection of device locations on the shadowtrack within 100 m distance from 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
Altitude above zero on shadowtrack [m]
85.2 or null if device is not on shadowtrack
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
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 if no reference deviceId or if device is in front of reference device
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

{
"name": "Sample repeat | 100km Duathlon ",
"location": "🇩🇪 Dresden",
"startTime": "2022-01-24T15:00:10.000Z",
"endTime": "2022-01-24T22:59:45.000Z",
"starters": [
{
"id": "61a2122f181c0a0ff7b53765",
"importId": "UniqueImportId_1",
"startNumber": "001",
"name": "🔥 Flaming 🔥 Sideburns 🔥",
"current": {
"time": "2022-01-24T16:33:47.012Z",
"lng": 13.727678288,
"lat": 50.976534023999996,
"elv": 85.2,
"fromStart": 9962.682666666668,
"toFinish": 89097.31733333334,
"eta": 16897.77,
"speed": 5.2727272727272725,
"distanceToShadowTrack": 12.592587304860292,
"gapAverage": 0,
"gap": 1205.68
}
},
{
"id": "61a2122f181c0abbacb538cd",
"importId": "UniqueImportId_41",
"startNumber": "045",
"name": "Greyhound-Express",
"current": null
},
{
"id": "61a21230181c0a0a40b53920",
"importId": "UniqueImportId_50",
"startNumber": "📢",
"name": "Vorausfahrer",
"current": {
"time": "2022-01-24T16:33:47.012Z",
"lng": 13.81113,
"lat": 50.93047,
"elv": 529.5,
"fromStart": 20010,
"toFinish": 79050,
"eta": 18557.89584,
"speed": 4.2596424,
"distanceToShadowTrack": 9.474680960457585,
"gapAverage": 2360.36,
"gap": 0
}
}
]
}

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
Copy link
On this page
Request
Response
Subsequent calculations