• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..22-Aug-2025-

base_station/22-Aug-2025-

boards/22-Aug-2025-

src/22-Aug-2025-

CMakeLists.txt A D22-Aug-2025244 96

README.rst A D22-Aug-20252.2 KiB6344

overlay-rtk.conf A D22-Aug-2025164 72

prj.conf A D22-Aug-2025304 138

sample.yaml A D22-Aug-2025577 2522

README.rst

1.. zephyr:code-sample:: gnss
2   :name: GNSS
3   :relevant-api: gnss_interface navigation
4
5   Connect to a GNSS device to obtain time, navigation data, and satellite information.
6
7Overview
8********
9This sample demonstrates how to use a GNSS device implementing the
10GNSS device driver API.
11
12Requirements
13************
14
15This sample requires a board with a GNSS device present and enabled
16in the devicetree.
17
18Sample Output
19*************
20
21.. code-block:: console
22
23    gnss: gnss_info: {satellites_cnt: 14, hdop: 0.850, fix_status: GNSS_FIX, fix_quality: GNSS_SPS}
24    gnss: navigation_data: {latitude: 57.162331699, longitude : 9.961104199, bearing 12.530, speed 0.25, altitude: 42.372}
25    gnss: gnss_time: {hour: 16, minute: 17, millisecond 36000, month_day 3, month: 10, century_year: 23}
26    gnss has fix!
27    gnss: gnss_satellite: {prn: 1, snr: 30, elevation 71, azimuth 276, system: GLONASS, is_tracked: 1}
28    gnss: gnss_satellite: {prn: 11, snr: 31, elevation 62, azimuth 221, system: GLONASS, is_tracked: 1}
29    gnss reported 2 satellites (of which 2 tracked, of which 0 has RTK corrections)!
30
31Real-Time Kinematics (RTK)
32**************************
33
34This sample may also be configured to enable Real-Time Kinematics (RTK) positioning for
35enhanced accuracy, with the assistance of a local base station.
36
37RTK Requirements
38****************
39
40This sample requires the following setup to work with RTK:
41
42* A UBlox F9P GNSS module connected to your board to act as a rover
43* A second UBlox F9P module connected to a PC to act as a base station
44
45Base Station Setup
46******************
47
48To enable RTK functionality:
49
501. Connect the base station F9P module to your PC via USB.
512. Also, connect the rover's serial port (running the sample) to your PC via USB.
523. Note the serial port the rover is connected through (e.g., /dev/ttyUSB0)
534. Run the base station script:
54
55.. code-block:: console
56
57	python3 base_station/base_station_f9p.py --port /dev/ttyUSB0
58
59The script configures the F9P module as a base station and streams RTCM3
60correction data to the rover. The base station will perform a survey-in
61process to determine its precise position before starting to transmit
62corrections.
63