API
Obtain the GPS and other information which is related location
The API will return fail when the device is not support GPS module.
Avaliable in 8.0.1 or later
Return Parameters
Return JSON
Type | Notation | Description | |
gps | Boolean | <boolean> | The GPS signal is valid or not |
location | Object | <GPS_Location_Obj> | GPS Location information |
<GPS_Location_Obj>
Type | Notation | Description | |
latitude | Number | <double> | – |
longitude | Number | <double> | – |
altitude | Number | <double> | – |
speed | Number | <double> | – |
heading | Number | <double> | – |
pdop | Number | <double> | Position Dilution Of Precision |
hdop | Number | <double> | Horizontal Dilution Of Precision |
vdop | Number | <double> | Vertical Dilution Of Precision |
timestamp | Number | <integer> | – |
cURL Example
curl -b cookies.txt http://192.168.1.1/api/info.location
{ "stat": "ok", "response": { "gps": true, "location": { "latitude": 22.340134, "longitude": 114.152588, "altitude": 55.1, "speed": 0.026751, "heading": 356.887, "pdop": 1.3, "hdop": 1, "vdop": 0.8, "timestamp": 1311972720 } } }