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.
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.
Connect to the SARA-R5 cellular module
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
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.
Now turn the radio back on;
Once your SARA-R5 connects to the carrier, you can use AT+CGDCONT? to get your current IP address
Now active the PDP context
Set the PDP type to IPv4
Profile #0 is mapped on CID=1
Activate the PSD profile
Your SARA-R5 should now have internet access. If you want to test the data connection, you can use AT+UPING
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:
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
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:
that complies to this format
- [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
- 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.
- 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’.
- The use of the CellLocate sensor requires a data connection, which must be active until the +UULOC URC is received.
- in case of error the module replies with +UULOCIND: 3,6
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)
The format of the answer provided is reported below with the relevant parameters highlighted in bold
major95 report the uncertainty of the position estimation at 50% and 95% confidence level
confidence95 report the value respectively of 50 and 95 to indicate which is the confidence level
Here below an example of an extended answer