Using CellLocate with OzzMaker SARA-R5 LTE-M GPS + 10DOF

What do you do if you have a poor or no GNSS signal, such has being indoors, inside a parking garage or in urban canyons? You could try CellLocate.

CellLocate

In a nutshell

CellLocate provides an estimated location based on visible network cell information reported by the cellular module. When CellLocate is activated, a data connection to the CellLocate server is established and the network cell information is passed to the server which provides an estimation of the device position based on the cell information.

CellLocate is fully integrated into the SARA-R5 which is on the OzzMaker SARA-R5 LTE-M GPS 10DOF board. The technology enables stand-alone location data based on surrounding mobile network information as well as hybrid technology that works in conjunction with GNSS. Through the single AT command interface, it is possible to define all the location settings for optimized performance.

When using CellLocate, the position accuracy is not predictable and is determined by the availability in the database of previous observations within the same area. CellLocate does not require a GNSS receiver to be present or active.

CellLocate requires a data connection (PDP) from the SARA-R5 module to the carrier.

 

Getting started

Connect to the SARA-R5 cellular module

pi@raspberrypi ~ $ minicom 115200 -D /dev/serial0

Setup the Packet Data Protocol (PDP) context.

First task is to setup the connection parameters for the PDP context using AT+CGDCONT. Any setting applied with this commend is persistent over power cycles. This means it only needs to be done once. You will however need to enter it again if you do a factory reset.

First, turn off the radio

 AT+CFUN=0

Then set up a connection profile with the APN for your network operator, using the AT+CGDCONT  command (Packet Switch Data configuration). In this example we are using a Hologram SIM, so the APN would be hologram.

AT+CGDCONT=1,”IP”,””hologram”

Now turn the radio back on;

 AT+CFUN=1

Once your SARA-R5 connects to the carrier, you can use AT+CGDCONT? to get your current IP address

AT+CGDCONT?
+CGDCONT: 1,”IP”,”hologram.mnc050.mcc234.gprs”,”10.170.92.244″,0,0,0,2,0,0,0,0,0,0,0

Now active the PDP context

AT+CGACT=1,1

Set the PDP type to IPv4

AT+UPSD=0,0,0

Profile #0 is mapped on CID=1

AT+UPSD=0,100,1

Activate the PSD profile

 AT+UPSDA=0,3

 

Your SARA-R5 should now have internet access. If you want to test the data connection, you can use AT+UPING

AT+UPING=”www.google.com”
OK
+UUPING: 1,32,”www.google.com”,”142.250.179.228″,113,617
+UUPING: 2,32,”www.google.com”,”142.250.179.228″,113,637
+UUPING: 3,32,”www.google.com”,”142.250.179.228″,113,636
+UUPING: 4,32,”www.google.com”,”142.250.179.228″,113,637

 

Using CellLocate

When using CellLocate, There are two modes to choose from:

normal scan: the cellular module reports the serving cell and the neighboring visible cells designated by the network operator, which are normally collected by the module during its “network” activity. This configuration is suggested for a quick update of location

deep scan: the cellular module scans and reports all visible cells providing in addition to serving and neighboring cells by the serving network operator, also the cells of all other available (visible) network operators, thus increasing the probability of obtaining a successful position estimation. Although this takes a bit longer (approximately 30 sec to 2 minutes is needed to perform a deep scan), uses more data (each reported cell requires a few bytes), and more power, coverage and reliability are potentially better in corner cases.

Note: Deep scan configuration is generally recommended only for corner cases that must be individually considered and tested

Scan mode can be configured using the AT+ULOCCELL= [value] where:
[value] = 0 for normal scan
[value] = 1 for deep scan

The scan mode influences the time needed to complete the scan, so the timeout value (explained in the next section) should be set accordingly. Be aware that the cell information is sent to the server only when the scan is completed, so setting a small value for the timeout means that the scan information may not be used.

The AT+ULOC command is used every time that the device application wants to get a position using CellLocate. The command syntax is:

AT+ULOC=[mode],[sensor],[response_type],[timeout],[accuracy]

Where recommended settings are:
[mode] = 2 (single-shot position)

[sensor] = 2, (CellLocate)

[response_type] = 0 – standard response type; other options are available for this parameter.

[timeout] = 30 (normal scan). The timeout value defines the maximum amount of time in seconds
allocated for the cell scan operation. If exceeded, the module sends the list of cells that it was able to collect before the timeout is reached. The timer is particularly important for deep scan mode because, as described previously, setting a short value does not allow a complete collection of cell ID of other operators than the serving one. In the event that the timeout is reached before the scan is complete, the output of normal scan will be sent to service endpoint to fulfill the request.

[accuracy] = 1000. This parameter (expressed in meters) specified the target accuracy when using hybrid positioning (CellLocate + GNSS). A low value will cause more frequent location requests whereas a high value, (up to 999999) can be used if you do not need a location update for every device movement in the specified range. Be aware that the module cannot predict in advance the real accuracy and will return any response provided by the service regardless of the calculated accuracy. When using CellLocate service in standalone mode (that is without GNSS) you can set 1000 as default value, as it does not affect in any way the behavior of the service

AT+ULOC=2,2,0,60,1000

Once the device application has sent the command to the module, the module autonomously:

  • collects all the information required to get the position
  • request the position estimation to the service, using a proprietary protocol
  • waits for the response from the server
  • provides back to the application, date, time and location information

An example of response (when response_type=0) is:

+UULOC: 13/04/2011,09:54:51.000,45.6334520,13.0618620,0,1

that complies to this format

+UULOC: [date][time],[lat],[long],[alt],[uncertainty]

Where :

  • [date] is a String that represents UTC date(DD/MM/YY) of the estimated position coming from the CellLocate server
  • [time] is a String that represents UTC time (hh:mm:ss.sss) of the estimated position coming from the CellLocate server
  • [lat] and [lon] are strings representing the estimated latitude and longitude
  • [alt] is a number reporting the estimated altitude, in meters. This is available only for hybrid positioning using GNSS and thus it is set to 0 when using CellLocate as the sensor
  • [uncertainty] is a number that represents the estimated 50% confidence level error, in meters (0 – 20000000). For a higher confidence level, read the relevant section below

Notes:

  1. Once the +ULOC AT command is sent, the user/application should wait for the corresponding +UULOC URC before issuing the command again. If a new +ULOC AT command is sent before the +UULOC URC, is returned, the previous command is aborted and replaced by the new one.
  2. If no position is available (no network information and no previous data available) then the [lat] latitude and [long] longitude will be set to ‘0’.
  3. The use of the CellLocate sensor requires a data connection, which must be active until the +UULOC URC is received.
  4. in case of error the module replies with +UULOCIND: 3,6

Payload Size

Data size exchanged between the module and the service end-point depends on the number of cells and are in the range of:

uplink: 100-200 bytes

Downlink: 150 bytes

Estimation uncertainty and confidence level

The position uncertainty cannot be predetermined because it depends on several factor like the region, the technology (2G, 3G, 4G). At global level it spans from 100 m to 2.7Km. .

As described in the previous section, the ULOC response provides the parameter that represents the estimated 50% confidence level error, in meters.

It is possible to get also the 95% confidence level by setting a different response type (the last ‘2’ in the command below)

AT+ULOC=2,2,2,60,1000

The format of the answer provided is reported below with the relevant parameters highlighted in bold

+UULOC:[sol],[num],[sensor_used],[date],[time],[lat],[long],[alt],[lat50],[long50],[major50],[minor50],[orientation50],[confidence50][,[lat95],[long95],[major95],[minor95][orientation95],[confidence95]]

where;
major50 and major95 report the uncertainty of the position estimation at 50% and 95% confidence level
confidence50 and confidence95 report the value respectively of 50 and 95 to indicate which is the confidence level

Here below an example of an extended answer

+UULOC:1,1,2,15/09/2021,14:49:21.000,45.3747522,11.8611112,0,45.3747522,11.8611112,490,490,0,50,45.3747522,11.8611112,1806,1806,0,95

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.