Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
boards/ | 18-Mar-2025 | - | 54 | 42 | ||
src/ | 18-Mar-2025 | - | 87 | 69 | ||
CMakeLists.txt | D | 18-Mar-2025 | 236 | 9 | 6 | |
README.rst | D | 18-Mar-2025 | 1 KiB | 30 | 22 | |
prj.conf | D | 18-Mar-2025 | 292 | 13 | 8 | |
sample.yaml | D | 18-Mar-2025 | 268 | 14 | 10 |
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! 30