| Login | Register

Documentation : Live tracking API

1. Login request (http GET)

At first, you initiate a login request with XCglobe login parameters and glider type code. You'll get back user_id and session_id values, for all further calls.

http://xcglobe.com/livetrack/login?usr=username&psw=password&g=glider_type

glider_type codes:

1 - paraglider
2 - HG flex wing
3 - HG rigid wing
4 - sailplane
5 - PPG foot launched (pilot has motor on his back)
6 - PPG wheel launched (motor is fixed on trike)
9 - other


Response (two lines of text, both values are integers):

u=user_id
h=session_id

Example:

u=937
h=4356533


In the case of an error, response will start with error:, followed by code.

error:code

Example:

error:2


Error codes:

1 - wrong input parameters
2 - login error (invalid username or password)
3 - server application internal error
4 - invalid session_id
5 - logging time interval too short (for preventing server overload)


2. Live tracking request (http GET)

http://xcglobe.com/livetrack/save?uid=user_id&h=session_id&lat=latitude&lng=longitude&alt=altitude&r=radius

Parameters:

user_id, session_id - parameters acquired from a login request
latitude - the latitude in decimal notation, use negative numbers for west
longitude - the latitude in decimal notation, use negative numbers for south
altitude - MSL altitude in meters
radius - radius in km, for retrieving positions of nearby gliders.


Testing: add parameter test=1 to get valid response, but without actually saving position into system.

Example:

http://xcglobe.com/livetrack/save?uid=213&h=64404596&lat=46.23445&lng=13.97235&alt=968&r=10


Response:

ok:
user_id_1,latitude,longitude,altitude,full_name_1
user_id_2,latitude,longitude,altitude,full_name_2
...

The first line indicates status of the response (ok: or error:). Error codes are the same as for the Login request (see above). Following lines simply list the nearby gliders, if there are any. Response is UTF-8 encoded.


Example of the response:

ok:
2187,46.23445,13.97235,968,Sebastjan Podbregar
1164,46.2672,15.0721,234,Martin ล eler
You have to assume that more values in each line will be returned in the future (after full_name there will be more comma separated values).



Live tracking API v2.0, 2017-01-05