The Location module manages location services using the Location library in the nRF Connect SDK. It handles Global Navigation Satellite System (GNSS) initialization and location requests, and it processes location events. The module uses Zephyr's State Machine Framework (SMF) and zbus for messaging with other modules.
The module performs the following tasks:
- Initializing and managing the Location library and the GNSS functionality.
- Handling location requests and processing location events.
- Managing the different location methods, which are GNSS, cellular, and Wi-Fi, and the fallback scenarios.
- Updating system time using GNSS time data when available.
- Publishing location status updates to other modules.
The Location module works together with the Network module, because the GNSS functionality can only be initialized after the modem is initialized and enabled. It uses the Location library's event handler to process location-related events and publish status updates through the zbus messaging system.
The following sections cover the module's main messages, configuration options, and state machine.
For implementation details, see the location.c, location.h, and Kconfig.location source files.