Skip to main content

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

FieldTypeDescription
statusBooleanIndicates whether the API request was successful. Should always be true.
locationObjectContains information about the location.
sourceStringThe source of the location data. GGA_GPS, GGA_GALILEO, GGA_GLONASS and GGA_GNSS.
atObjectThe time and date of the location fix.
dateObjectThe date of the location fix.
DayIntegerThe day of the month.
MonthIntegerThe month of the year.
YearIntegerThe year.
timeObjectThe time of the location fix. (UTC)
HourIntegerThe hour of the day.
MinuteIntegerThe minute of the hour.
SecondIntegerThe second of the minute.
latitudeFloatThe latitude of the location.
longitudeFloatThe longitude of the location.
fixStringThe type of location fix. Standalone or Differential GPS (DGPS).
numSatellitesIntegerThe number of satellites used to determine the location.
hdopFloatThe horizontal dilution of precision.
altitudeFloatThe altitude of the location (meters).
geoidalSeparationFloatThe separation between the geoid and the WGS84 ellipsoid (meters).
dgpsAgeIntegerThe age of the DGPS data.
dgpsIdStringThe DGPS ID.
speedFloatThe speed of the device at the time of the location fix (knots).
headingFloatThe heading of the device at the time of the location fix (degrees).
errorsArrayAn array of any errors that occurred. Should always be empty.