Compact raw measurements
In several scenarios, transmitting payloads of hundred of bytes is not possible because of constrains imposed by the WAN technology or simply not recommended because the message transmission takes too much time thus draining the battery of constrained device.
In those scenarios you can take advantage of the CloudLocate compact messages option to reduces significantly the size of GNSS raw measurement.
CloudLocate supports three types of compact raw measurement:
50 bytes - supported natively by M10 GNSS and available in M8 and M9 through a conversion library for host processor
20 bytes - M10 GNSS module/chip is required
12 bytes - M10 GNSS module/chip is required
How to use compact messages
Using a compact message is the same as using a MEASX format:
If using M10, just configure the module to use the desired message format as described in the M10 documentation. If using M8 or M9, u-blox provides a reference implementation for the host processor that implements the conversion from MEASX to MEAS50.
Trigger the generation of a raw measurement from the GNSS using the script provided in the Getting started guide
Send the reading to CloudLocate service endpoint
There are two ways of sending a Compact Message to CloudLocate:
Device to service: send the raw measurement from your device to CloudLocate using a CloudLocate Thing as explained in the CloudLocate getting started
Service to Service: send the raw measurement to your application server (using your preferred protocol) and get the position estimation by issuing the measurement to the CloudLocate endpoint by using one of the following methods
As for MEASX, you can decide to send just the raw measurement or using the JSON payload format:
when sending measurements in real time, it's more convenient to use the binary mode, sending exactly the message received from the GNSS
when sending delayed message (that is when you send the measurement to CloudLocate service later than 59 secs from capturing it from the GNSS) you shall use the JSON format including date and time of the capture.
Example of a 50 byte compact message
Here below and example of JSON payload in case the measurement is sent to service endpoint as a delayed message
The above compact message would translate to following location:
Using binary format
For high latency networks, it is extremely important to keep small the payload size. Using the JSON format, you could not be able to send the raw measurements to the service because it add extra bytes that makes the payload exceeding the Maximum Transmission Unit allowed by the WAN (Wide Area Network).
You can anyway use the binary format: it consist in sending the raw measurement, exactly as received by the GNSS without adding any extra information and neither formatting characters. The reference implementation available in the Download section provides an option that allows you to decide whether to send the message in the JSON or in Binary format both for the MEASX and the MEAS50 raw measurement.
Note: when using Binary format you cannot add the Date and Time information, therefore you can send to CloudLocate service only "live" measurements (within 59 seconds form generation). You cannot store the measurement on the device for a post processing. If you are in this use case, the only option is to use JSON format.
To convert a message from MEASX to MEAS50 you can refer to the reference implementation available in the Download section.