Using GNSS raw measurements

 A GNSS raw measurement is a binary u-blox message, generated by u-blox GNSS containing the satellites information in an optimized and very compact format. Delivering these measurements to u-blox cloud hybrid positioning service, you can get an estimation of the position and save up to 90% of the GNSS energy by reducing the on-time period of the GNSS receiver.

As explained in the Getting started guide of CloudLocate, combining the GNSS raw measurements with other sources  like Wi-Fi Access points scan and/or cellular base stations scan you can maximize the overall position fix rate also in complex environment for GNSS like urban canyons or areas with limited or null sky view.  Therefore you  always obtaining the best possible position of the device saving energy at the same time.

Raw measurement selection

There are two options available:

If your application support MEAS50 option, it suggested to use this one since it's more accurate and reliable than MEAS20.

Generating a  GNSS raw measurement with u-blox M10

The following explanation is based on u-blox M10 GNSS receivers with Firmware version SPG 5.10 or higher. 

If you are using a different Firmware version or a different u-blox GNSS (M8 or M9 generation), please contact the support to get further assistance

Step 1 - Configure the GNSS

For the complete GNSS configuration you can refer to the guide M10 firmware 5.10 interface description, independently from the form factor (section UBX-CFG-VALSET).  Here below you can find the list of the the relevant configurations for the raw measurement generation:

GPS Enable: b562068a0900000100001f00311001fb80

Galileo Disable: b562068a0900000100002100311000fc89

BDS Disable: b562068a0900000100002200311000fd8e

Glonass Disable: b562068a0900000100002500311000009d

UBX-RXM-MEAS50: b562068a09000001000049069120019baa

UBX-RXM-MEAS20: b562068a09000001000044069120019691

By doing this configuration, the GNSS starts sending in output the selected message (at 2Hz rate) that will be used by the service to estimate the position. 

UBX-CFG-RST: b56206040400ffff01000d5f 

Notes:

UBX-RXM-MEAS50: b562068a09000001000049069120009aa9

UBX-RXM-MEAS20: b562068a09000001000044069120009590


Step 2 - test GNSS Raw measurement

Depending on network connectivity  there are two options to build the JSON payload.

Low-bandwidth connectivity

If you are using LoRAWAN, Satellite or other low bandwidth connectivity, you probably need to minimize the payload size to be sent to the cloud by the IoT device.

In such case there are two options:

Note: In case you need to store the RAW data in the device and estimate the position at a later time, you need to save also the date and time information for each RAW measurement and get the position estimation through the REST API (Service-to-Service access mode) 

Other connectivity type

For connectivity with higher bandwidth, the JSON format is suggested since it can carry more information. A typical payload using MEAS50 is

{

"RequestId": "82cb34c9-88c9",

"GNSSMeasurements": {

"Payload":"tWIChjIAG/M7CcimDqBmvpr+A9pGYVEPdxhiyIqPToNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAA==",

  "DateTime": "2023-04-05T12:50:16"

 }

}

where the MEAS50 raw measurement is specified in the Payload attribute.

The "Payload" field contains always the MEAS20 or MEAS50 data, including UBX headers and checksum (see below), as sent to the Host by the GNSS receiver, and it's always encoded in Base64.

The DateTime attribute, that indicates the generation time and date, is not required as long as the generated measurement is delivered to the service within 60 seconds from the generation time

This (working) example returns the following position

{

    "Location": {

        "Lat": 51.4964168,

        "Lon": -0.1096041,

        "Unc68": 5.35

    },

    "DateTime": "2023-04-05T12:50:16",

    "RequestId": "82cb34c9-88c9",

    "LocationSource": "GNSS"

}

The LocationSource attribute shows that the location has been calculated using the provided GNSS raw measurements

Note:  when using GNSS Raw data the DateTime parameter in the location response provides the information about the exact UTC date and time when the RAW measurement have been generated with reference to  the satellite clock and it might differ from the  IoT device date and time. 

As second step, if this is a applicable to your use case, you are suggested to build payload using GNSS raw measurements plus Wi-Fi and/or Cellular scans. You can always check the LocationSource attribute to verify which source have been used.

UBX frame structure

The M10 interface description available in the u-blox website specifies the structure of the message (raw measurement) sent-out by the GNSS. It is shown in the following picture:

For your reference we briefly summarize below the Class and Message ID for each of the relevant messages described in the previous section that you can use to identify the measurement


Using u-blox M8/M9 receivers

With u-blox M8 and M9 GNSS receivers is still possible to leverage CloudLocate service by using a different type of RAW data (UBX-RXM-MEASX) that is bigger  than the MEAS20 and MEAS50 and thus is not applicable to low bandwidth network. The message size is 44 bytes for the header plus 2 bytes for each satellites, therefore at least 164 bytes are required. It is anyway a good option in case to retrofit the devices already in the field.

The CloudLocate M8/M9 guide provides a detailed description on how to test the service.