*/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
Live sample https://racemap.com/api/data/v1/6336f41309be310001a5894b/current Corresponding map https://racemap.com/player/100KmDuathlon2018_API-liveSample
Optional query parameters
Set various query parameters according to your need when calling the API endpoint, e.g. in order to smoothen gap values.
The
deviceId
of a chosen reference device for calculationgapAverage
,gap
,gapChase
andgapDistance
.String for API ?deviceId=6336f41309be310001a58977
You can call the same API endpoint with different query parameters at the same time. You can also combine queries with & in one call eg. https://racemap.com/api/data/v1/6336f41309be310001a5894b/current?liveDelay=600&interpolation=false¤tSpeedDuration=600&deviceId=6336f41309be310001a58977
Response
Event object
Participant object
Current object
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
gapAverage
,gap
,gapChase
andgapDistance
are calculated for the leader by default. Leader: device with the smallesttoFinish
value. Attention: Each time a leader reaches the finish the device closest to the finish becomes the new leader. The speed value of the next leader may impact fluctuating gap values. Reference: If query withdeviceId
orstartNumber
, then calculation with reference values instead of leader.
Sample response
Smoothen values in the API
The below parameters and settings smoothen the values in the API.
Call the
gapAverage
value instead ofgap
valueInterpolation=true
Query parameter
currentSpeedDuration
Use gapAverage
instead of gap
if you need smoothly changing gap values e.g. for TV production.
Increase the currentSpeedDuration
query parameter to smooth the speed
values in the API.
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 peaksoption 2:
eta
(participant 2) -eta
(participant 1)option 3:
gap
(participant 2) -gap
(participant 1)
Identify the leader: the smallest value of toFinish
Last updated