*/current, location data
API with 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/66bf4318d1c783279d183dd3/current Corresponding map https://racemap.com/player/100KmDuathlon2018_API-live-sample
Optional query parameters
Set various query parameters according to your need when calling the API endpoint, e.g. to smoothen gap values.
The
Id
of a chosen reference participant for calculationgapAverage
,gap
,gapChase
andgapDistance
.String for API ?deviceId=66bf4318d1c783279d183e3d
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/66bf4318d1c783279d183dd3/current?liveDelay=600&interpolation=false¤tSpeedDuration=600&deviceId=66bf4318d1c783279d183e3d
Response
Event object
Field | Description [unit] | Sample |
---|---|---|
| Name of event |
|
| Location |
|
| Start time in UTC |
|
| End time in UTC |
|
| Array for participant objects |
Participant object
Field | Description [unit] | Sample |
---|---|---|
| Unique Racemap ID of participant |
|
| Name |
|
| Bib number |
|
| User-defined ID with imported participant data, Generic API ( |
|
| Object for real-time location data |
|
| Object for device information |
|
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.
Field | Description [unit] | Sample |
---|---|---|
| Timestamp in UTC when geolocation was recorded, if |
|
| Current longitude of participant |
|
| Latitude |
|
| Altitude above zero on shadowtrack [m] |
|
| Average speed [m/s] depending on If event has a shadowtrack, than projection on shadowtrack. If event without shadowtrack, than same value as |
|
| Average speed [m/s] depending on |
|
| Distance from first geolocation of shadowtrack along shadowtrack [m] |
|
| Distance to last geolocation of shadowtrack along shadowtrack [m] |
|
| Distance from shadowtrack [m] if more than 100 m |
|
| Estimated time of arrival [s], time to reach last geolocation of shadowtrack, prediction with |
|
| Duration [s] to reach current |
|
| Duration [s] to reach current |
|
| Duration [s] to reach current |
|
| Distance [m] to reach current |
|
Device object
The device object provides additional information for GPS trackers, that are used in tracker management.
Tracker managementField | Description [unit] | Sample |
---|---|---|
| Unique id of tracking device, can be IMEI or transponder id or App id depending on the type of device. |
|
| Charge level [%] of device. |
|
| Connection status with RACEMAP server, determined by checking if there is a socket connection to the device and evaluating the time since the last message was received. |
|
| Showing whether the device had a GPS fix when recording the latest coordinate. |
|
| Timestamp in UTC when the latest coordinate was recorded. Note: If |
|
| Unique id of the tracking device in RACEMAP. |
|
The GPS tracker does not send the information when it loses the GPS fix. If the device loses the fix, no coordinates are recorded. Therefore, evaluating online
status along with lastLocationAt
provides a more reliable observation than relying solely on the lastLocationGpsFix
parameter.
If online
is true
but there is no current lastLocationAt
:
Device may have lost its GPS fix and is unable to record coordinates.
Could suggest potential tampering or manipulation, also.
If online
is false
:
Device may have lost its network connection.
Device may have been turned off, also.
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.
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 in the time grid and the coordinate before | Latest coordinate without interpolation from the time grid |
Refresh rate | Up to 1 sec | Report interval of GPS device |
Recommended interpolation interval | report interval of GPS device | report interval of GPS device |
Recommended | 5 sec + interpolation interval | 5 sec minimum |
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