Take the Poll | Join our Discussion
sponsored by
Introduction
Many modern devices feature location-based services that use real-time geographical data to track their physical position. Technologies such as GPS, Wi-Fi, cellular, QR codes, and RFID provide the position data that helps a device calculate its location. Processing can take place on either the device itself or a cloud platform. Using a cloud platform to handle the brunt of the processing can enable faster location discovery, improved accuracy, and considerable power savings. Location information plays an important role in the functionality of devices such as asset trackers, wearables, smart appliances, navigation devices, and point-of-sale payment terminals.
Location Services with GPS
The traditional method for location services, Global Positioning System (GPS), uses a network of satellites; a device locks onto several of these satellites using an onboard GNSS (Global Navigation Satellite System) receiver. From there, the device is able to triangulate its own location by cross-referencing its distance to each satellite with the exact location of each satellite in space. One of the limitations of this approach is latency. A GPS satellite typically has a throughput of just ~50bps. Its time-to-first-fix (TTFF) can also be several minutes. Interference from large structures can occur, limiting GPS to outdoor use. Another disadvantage of traditional GPS methods is high power consumption, making it unsuitable for use in battery-powered IoT devices. Figure 1 illustrates the process of coordinate acquisition via GPS.
PIC
Figure 1: Traditional process for Location Discovery with GPS
Source: Nordic
A-GPS (Assisted GPS) and P-GPS (Predicted GPS) are two types of GPS cloud assistance that are used to offset the drawbacks of utilizing a GNSS receiver. In both scenarios, the essential GPS data is sent to the device via the cloud and an LTE modem at substantially greater transfer speeds.
Nordic nRF Cloud Location Services
Nordic’s nRF Cloud platform is a collection of integrated software microservices that provide functionality and IoT connectivity to Nordic devices. nRF Cloud tools are compatible with most web browsers. Some of the built-in functionality includes managing iBasis SIM activation, monitoring cellular data usage, and visualizing data with integrated graphing tools. The nRF cloud platform is built on Amazon Web Services (AWS). Device interaction occurs in three ways: a web portal, a REST API, and an MQTT API. A combination of three is also applicable in some instances.
What is a REST or MQTT API? An Application Programming Interface (API) is a software interface that enables two applications to communicate with each other. An API lists the supported operations and their input and output variables. Other applications can follow this specification to access, or consume, the API to use the software service. REST (Representational State Transfer) and MQTT (MQ Telemetry Transport) are two types of API connections. REST is a one-way request/response model that communicates over HTTP. When a client wants to communicate with the server, it sends a request to the server and waits for a response. MQTT is a two-way system, where the client is connected at all times via TCP/IP or Websockets. This allows the server to push messages to the client. |
There are two ways to connect to the nRF Cloud: Device-to-nRF Cloud and Cloud-to-nRF Cloud. Figure 2a illustrates Device-to-nRF Cloud; the device connects directly to the nRF Cloud with a bi-directional MQTT over a TLS connection. In the case of Cloud-to-nRF Cloud (Figure 2b), the device first connects to the customer's cloud, which then communicates to the nRF Cloud via REST API. This method is suitable for customers with an existing cloud infrastructure, and offers greater flexibility and control over the device communication workflow.
PIC
Figure 2: a) Device-to-Cloud and b) Cloud-to-Cloud
Nordic’s nRF Cloud Location Services enable customers to get location data for connected devices quickly and accurately. It offers a variety of location services, letting customers choose whether accuracy or efficiency is more important. An application that prioritizes low power consumption over accuracy might use single-cell (SCELL) or multi-cell (MCELL) location features, saving power by not using GPS, however, but decreasing precision. On the other hand, nRF Cloud Location Services’ A-GPS and P-GPS offer greater accuracy at the expense of higher power consumption (although efficiency is still greater than using GPS alone).
Five Things to Know About Location Services
This section will introduce five essential concepts to know about location services: location accuracy, cloud-assisted GPS, Time-To-First-Fix (TTFF), location-based on cell towers, and Wi-Fi triangulation.
1. Location accuracy
The accuracy of a location service is determined by its horizontal positioning error (HPE), or the maximum distance that the calculated location can differ from the actual location. A location service with low accuracy might be able to determine a device’s location with an HPE of 1000 meters, while a medium accuracy service might have an HPE of 300 meters. One factor that affects location accuracy is the presence of cell towers. Location accuracy might suffer in rural areas, where only one or two towers are present to cover a 10+ km radius.
2. Cloud-assisted GPS
Cloud assistance overcomes the disadvantages of using a GNSS receiver by transferring GPS data to the device through the cloud over an LTE modem, which has much faster transfer rates than satellite. A-GPS allows the device to download assistance data via the LTE network at ~150 kbps. In addition to the latency advantage, less power is used, because the system is less dependent on the resource-hungry GNSS receiver. P-GPS allows the device to download up to two weeks of predicted satellite location data, allowing the device to determine location even without an active network connection. Figure 3 depicts the steps involved in cloud-assisted GPS implementation.
PIC
Figure 3: Cloud-assisted GPS implementation
GPS assistance data comprises date and time, rough location on earth, and satellite orbit information, which includes ephemerides, or accurate satellite orbits (usable for a maximum of 6 hours), and almanac, or approximate satellite orbits (usable for a month or more). Other information, such as ionospheric correction or integrity data is also included.
3. Time-To-First-Fix (TTFF)
Time-To-First-Fix (TTFF) is the amount of time needed for a device to obtain location information. TTFF typically ranges from 30 seconds to 2 minutes, depending on satellite availability and the type of receiver. The GNSS receiver needs to track the incoming signals of at least four satellites to obtain ranging information. Cold start, hot start, and warm start are industry standard terms describing the starting condition of the GNSS receiver.
A cold start refers to a state where the device does not have any previous data. Any activity after a reset or power cycle is considered a cold start.
A hot start refers to the state where the device has recently received a fix and is now ready for another.
A warm start refers to the state where the device has a rough location, date and time, internal clock oscillator frequency, and almanac, but no ephemeris. A TTFF of approximately 30 seconds is needed for the GPS unit to obtain the current ephemeris for each tracked satellite.
4. Location-based on Cell Towers
Location information can also be determined using cellular towers near the device. The location of the device is calculated in the Cloud and then sent to the device. Single-cell (SCELL) assistance uses the nearest cell tower, whereas multi-cell (MCELL) assistance uses multiple cell towers to triangulate a position. If multiple towers are available, MCELL provides a more accurate location. Figure 4 illustrates the steps in determining location based on cell towers.
PIC
Figure-4: Cell-based location services
Because the GNSS receiver on the device does not need to be used, power consumption and memory usage is much lower. The trade-off is accuracy; a GNSS-based system can determine a more precise position. For devices where battery life is more important than overall accuracy, cell-based location assistance is a good compromise.
5. Wi-Fi positioning
Devices can use Wi-Fi hotspots and wireless access points to determine their location. Typically, a device first measures the receiving signal strength indicator (RSSI) for a Wi-Fi hotspot, which indicates how close it is. The RSSIs for several hotspots are measured in order to triangulate a location.
nRF Cloud offers the means to take over the bulk of the computing work. The device scans nearby Wi-Fi networks and sends their details to nRF Cloud. nRF Cloud queries a database for the coordinates of Wi-Fi networks, calculates the device’s location, and then sends it back to the device. Wi-Fi positioning is an effective solution for devices that are indoors, or in areas where GNSS or cellular networks are not available.
Nordic nRF9160
The nRF9160 is a low-power cellular IoT solution, integrating an ARM® Cortex®-M33 processor with advanced security features, a range of peripherals, as well as an LTE modem. The nRF9160 supports PSM and eDRX power-saving features, enabling it stay in sleep mode for extended periods. The modem firmware is upgradable via secure, encrypted firmware over the air (FOTA) updates.
Figure 5 depicts a block diagram of the overall system.
PIC
Figure-5: nRF9160 SoC block diagram
ARM TrustZone technology, Cryptocell 310, and supporting blocks for system protection and key management are embedded to enable the advanced security needed for IoT applications. Targeting asset tracking applications, the nRF9160 SiP has built-in support for nRF Cloud Location Services. The integrated cryptographic and security features enable the nRF9160 SiP to meet the latest Internet security and authentication requirements.
Conclusion
Integrating Location Services into IoT devices offers a variety of benefits, including remote asset tracking, location discovery for wearables, and navigation. Location services for devices have traditionally been implemented using onboard GNSS receivers, however, cloud computing has emerged as an effective solution for some of the drawbacks of GPS. Nordic’s nRF Cloud offers several methods for Location Services that increase speed and accuracy, as well as reducing overall power consumption, bringing location capabilities to a much wider range of devices.