Last Known GNSS Fix API
If you need to retrieve the last known GNSS fix of the RockREMOTE device, you can use the local API to conveniently access this information.
Devices can make a HTTP GET request on port 8080 to the local IP address of the RockREMOTE
(default 192.168.250.1
), as follows:
http://<rockremote ip>/api/public/last-known-location
The response will be a JSON-formatted string containing the GNSS fix information, including (but not limited to):
Location fix timestamp
Latitude and Longitude
HDOP and number of satellites used for the fix
Altitude and Geoidal Separation in meters
DGPS ID and age in seconds
Speed over ground in knots
Heading, degrees from true north
If the RockREMOTE does not have a known GNSS fix, the local API will return a JSON-formatted string with the status
field set to false
, and the error reporting NO_FIX_AVAILABLE
.
Any response code other than 200 should be treated as a disconnection.
Last Known Location JSON structure
Field | Type | Description |
---|---|---|
status | Boolean | Indicates whether the API request was successful. Should always be true. |
location | Object | Contains information about the location. |
source | String | The source of the location data. GGA_GPS, GGA_GALILEO, GGA_GLONASS and GGA_GNSS. |
at | Object | The time and date of the location fix. |
date | Object | The date of the location fix. |
Day | Integer | The day of the month. |
Month | Integer | The month of the year. |
Year | Integer | The year. |
time | Object | The time of the location fix. (UTC) |
Hour | Integer | The hour of the day. |
Minute | Integer | The minute of the hour. |
Second | Integer | The second of the minute. |
latitude | Float | The latitude of the location. |
longitude | Float | The longitude of the location. |
fix | String | The type of location fix. Standalone or Differential GPS (DGPS). |
numSatellites | Integer | The number of satellites used to determine the location. |
hdop | Float | The horizontal dilution of precision. |
altitude | Float | The altitude of the location (meters). |
geoidalSeparation | Float | The separation between the geoid and the WGS84 ellipsoid (meters). |
dgpsAge | Integer | The age of the DGPS data. |
dgpsId | String | The DGPS ID. |
speed | Float | The speed of the device at the time of the location fix (knots). |
heading | Float | The heading of the device at the time of the location fix (degrees). |
errors | Array | An array of any errors that occurred. Should always be empty. |