{"id":22249932,"url":"https://github.com/eduponz/easynmea","last_synced_at":"2025-08-23T04:09:32.447Z","repository":{"id":46504851,"uuid":"157908760","full_name":"EduPonz/easynmea","owner":"EduPonz","description":"A c++ library to get NMEA information from modules which use NMEA 0183 over serial communication.","archived":false,"fork":false,"pushed_at":"2021-10-22T10:00:48.000Z","size":286,"stargazers_count":11,"open_issues_count":8,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-28T05:50:27.303Z","etag":null,"topics":["cpp","gnss","gps","gps-data","gps-library","nmea","nmea0183","open-source"],"latest_commit_sha":null,"homepage":"https://easynmea.readthedocs.io","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EduPonz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-16T18:52:16.000Z","updated_at":"2025-07-13T16:18:11.000Z","dependencies_parsed_at":"2022-09-23T02:22:09.306Z","dependency_job_id":null,"html_url":"https://github.com/EduPonz/easynmea","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EduPonz/easynmea","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EduPonz%2Feasynmea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EduPonz%2Feasynmea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EduPonz%2Feasynmea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EduPonz%2Feasynmea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EduPonz","download_url":"https://codeload.github.com/EduPonz/easynmea/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EduPonz%2Feasynmea/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271740725,"owners_count":24812642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","gnss","gps","gps-data","gps-library","nmea","nmea0183","open-source"],"created_at":"2024-12-03T06:33:02.782Z","updated_at":"2025-08-23T04:09:32.418Z","avatar_url":"https://github.com/EduPonz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyNMEA {#index}\n\n[![automated_testing](https://github.com/EduPonz/easynmea/actions/workflows/automated_testing.yml/badge.svg?branch=main)](https://github.com/EduPonz/easynmea/actions/workflows/automated_testing.yml)\n[![Publish Docker image](https://github.com/EduPonz/easynmea/actions/workflows/publish_docker_image.yml/badge.svg)](https://github.com/EduPonz/easynmea/actions/workflows/publish_docker_image.yml)\n[![Documentation Status](https://readthedocs.org/projects/easynmea/badge/?version=latest)](https://easynmea.readthedocs.io/en/latest/?badge=latest)\n[![Docker pulls](https://img.shields.io/docker/pulls/eduponz/easynmea.svg)](https://hub.docker.com/repository/docker/eduponz/easynmea)\n[![codecov](https://codecov.io/gh/EduPonz/easynmea/branch/main/graph/badge.svg?token=S3Q0EIDO85)](https://codecov.io/gh/EduPonz/easynmea)\n[![CodeQL](https://github.com/EduPonz/easynmea/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/EduPonz/easynmea/actions/workflows/codeql-analysis.yml)\n\n**EasyNMEA** is a `C++` library to get **NMEA** information from NMEA modules which communicate with **NMEA 0183** over UART.\nIt can retrieve NMEA data from any NMEA device sending **NMEA 0183** sentences over UART.\n\n* [Features](#features)\n* [Getting started](#getting-started)\n    * [Prerequisites](#prerequisites)\n    * [Build and install](#build-and-install)\n    * [Build documentation](#build-documentation)\n    * [Run examples](#run-examples)\n* [Usage](#usage)\n* [Authors](#authors)\n* [License](#license)\n* [To-Do](#to-do)\n\nFor more detailed information, please visit the [EasyNMEA documentation](https://easynmea-docs.readthedocs.io/).\n\n## Features\n\n**easynmea** provides the `EasyNmea` class, which uses **NMEA 0183** sentences to extract **NMEA** information from the modules, providing a simple and easy-to-use API.\n\n## Getting started\n\n**easynmea** has been developed and tested in Ubuntu 20.04 Operating System, although it is expected to support Windows 10 and MacOS thanks to [Asio](https://github.com/chriskohlhoff/asio), the cross-platform library used to interact with the serial ports.\n\n### Prerequisites\n\n**easynmea** relies on [Asio](https://github.com/chriskohlhoff/asio) for establishing a serial connection with the NMEA module.\nOn Ubuntu platforms, this can be installed with:\n\n```bash\nsudo apt install libasio-dev\n```\n\n### Build and install\n\nTo build the library, run:\n\n```bash\ncd ~\ngit clone https://github.com/EduPonz/easynmea.git\nmkdir build \u0026\u0026 cd build\ncmake ..\ncmake --build .\n```\n\nOnce built, the library can be installed in a user specified directory with:\n\n```bash\ncd ~/easynmea/build\ncmake .. -DCMAKE_INSTALL_PREFIX=\u003cuser-specified-dir\u003e\ncmake --build . --target install\n```\n\nTo install the library system-wide, just omit the `CMAKE_INSTALL_PREFIX`:\n\n```bash\ncd ~/easynmea/build\ncmake ..\ncmake --build . --target install\n```\n\n### Build documentation\n\nIt is possible to generate the library's documentation passing CMake option `-DBUILD_DOCUMENTATION=0N` (defaults to `OFF`) on the configuration step:\n\n```bash\ncd ~/easynmea/build\ncmake .. -DCMAKE_INSTALL_PREFIX=\u003cuser-specified-dir\u003e -DBUILD_DOCUMENTATION=ON\ncmake --build . --target install\n```\n\n### Run examples\n\nIt is also possible to build and install the library's examples passing CMake option `-DBUILD_EXAMPLES=ON` (defaults to `OFF`) on the configuration step:\n\n```bash\ncd ~/easynmea/build\ncmake .. -DCMAKE_INSTALL_PREFIX=\u003cuser-specified-dir\u003e -DBUILD_EXAMPLES=ON\ncmake --build . --target install\n```\n\nThen, they can be run with:\n\n```bash\ncd \u003cuser-specified-dir\u003e/examples/bin\n./gpgga_example\n```\n\nAn output example from `gpgga_example` would be:\n\n```\nSerial port '/dev/ttyACM0' opened. Baudrate: 9600\nPlease press CTRL-C to stop the example\n\n************** NEW GPGGA SAMPLE **************\nElapsed time ---------\u003e 3468\n------------------------------------------\nGPGGA Data - GNSS Position Fix\n==============================\nMessage --------------\u003e $GPGGA,072706.000,5703.1740,N,00954.9459,E,1,8,1.28,-21.2,M,42.5,M,,*4E\nTimestamp ------------\u003e 72706\nLatitude -------------\u003e 57.0529º N\nLongitude ------------\u003e 9.91576º E\nFix ------------------\u003e\nNumber of satellites -\u003e 8\nHorizontal precision -\u003e 1.28\nAltitude -------------\u003e -21.2\n```\n\nThe some example's parameters can be configured using command line options.\nRun `./gpgga_example --help`\n\n```\n------------------------\nEasyNMEA - GPGGA Example\n------------------------\nUsage: ./gpgga_example [OPTIONS]\n    -h/--help:                Print this help and exit\n    -b/--baudrate [bauds]:    The connection baud rate in bauds [Defaults: 9600]\n    -p/--serial_port [port]:  The serial port to use [Defaults: 'dev/ttyACM0']\nExample: ./gpgga_example -p /dev/ttyUSB0 -b 9600\n```\n\n## Usage\n\nThe **NMEA** information can be retrieved in the following manner (see [gpgga_example.cpp](examples/gpgga_example.cpp)):\n\n```c++\nusing namespace eduponz::easynmea;\n// Create an EasyNmea object\nEasyNmea easynmea;\n// Open the serial port\nif (easynmea.open(\"/dev/ttyACM0\", 9600) == ReturnCode::RETURN_CODE_OK)\n{\n    // Create a mask to only wait on data from specific NMEA 0183 sentences\n    NMEA0183DataKindMask data_kind_mask = NMEA0183DataKind::GPGGA;\n    // This call will block until some data of any of the kinds specified in the mask is available.\n    while (easynmea.wait_for_data(data_kind_mask) == ReturnCode::RETURN_CODE_OK)\n    {\n        // Take all the available data samples of type GPGGA\n        GPGGAData gpgga_data;\n        while (easynmea.take_next(gpgga_data) == ReturnCode::RETURN_CODE_OK)\n        {\n            // Do something with the GNSS data\n            std::cout \u003c\u003c \"GNSS position: (\" \u003c\u003c gpgga_data.latitude \u003c\u003c \"; \" \u003c\u003c gpgga_data.longitude \u003c\u003c \")\" \u003c\u003c std::endl;\n        }\n    }\n}\n// Close the serial connection\neasynmea.close();\n```\n\n## Authors\n\n**easynmea** has been developed by **Eduardo Ponz**.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feduponz%2Feasynmea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feduponz%2Feasynmea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feduponz%2Feasynmea/lists"}