This module manages location services using the Location library in the nRF Connect SDK. It handles GNSS (Global Navigation Satellite System) initialization, location requests, and 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 GNSS functionality.
- Handling location requests and processing location events.
- Managing different location methods (GNSS, cellular, Wi-Fi) and fallback scenarios.
- Updating system time using GNSS time data when available.
- Publishing location status updates to other modules.
The location module works in conjunction with the network module, as GNSS functionality can only be initialized after the modem is initialized and enabled. It uses the Location library's event handler to process various location-related events and publish status updates through the zbus messaging system.
In the following sections, the module's main messages, configurations, and state machine are covered.
Refer to the source files (location.c, location.h, and Kconfig.location) for implementation details.