- Notifications
You must be signed in to change notification settings - Fork0
NMEA 0183 - for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GNSS receivers and many other types of instruments. Defined and controlled by the National Marine Electronics Association (NMEA)
License
Tapped/nmea
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Complete documentation can be found on www.docs.rs/nmea
Supported sentences:
NMEA Standard Sentences
- AAM
- ALM
- APA
- BOD
- BWC
- BWW
- DBK
- GBS
- GGA *
- GLL *
- GNS *
- GSA *
- GST
- GSV *
- HDT
- MDA
- MTW
- MWV
- RMC *
- TTM
- VHW
- VTG *
- WNC
- ZDA
- ZFO
- ZTG
Other Sentences
- TXT *
Vendor Extensions
- PGRMZ
*Nmea::parse()
supported sentences
We have an ongoing effort to support as many sentences fromNMEA 0183
as possible,starting with the most well-known.If you'd like to contribute by writing a parser for a given message, check out theSupporting additional sentences (AeroRust/nmea#54) issue and contribute in3 easy steps:
- Write a comment - Please write a comment in the issue for the sentence(s) you'd like to implement, you will be mentioned on the task to avoid duplicate implementations.
- Implement each sentence alongside at least 1 test in its own module under the
./src/sentences
directory using thenom
crate. - Open a PR 🎉
NMEA 0183 is a combined electrical and data specification for communicationbetween marine electronics such as echo sounder, sonars, anemometer,gyrocompass, autopilot, GPS receivers and many other types of instruments.
Add thenmea
dependency in yourCargo.toml
:
[dependencies]nmea ="0.6"
This crate supportno_std
without the use of an allocator (alloc
),just add thenmea
crate without the default features:
[dependencies]nmea = {version ="0.6",default-features =false }
To use the NMEA parser create aNmea
struct and feed it with NMEA sentences (only supportsGNSS
messages, otherwise use theparse_str()
andparse_bytes()
):
use nmea::Nmea;fnmain(){letmut nmea =Nmea::default();let gga ="$GPGGA,092750.000,5321.6802,N,00630.3372,W,1,8,1.03,61.7,M,55.2,M,,*76";// feature `GGA` should be enabled to parse this sentence.#[cfg(feature ="GGA")]{ nmea.parse(gga).unwrap();println!("{}", nmea);}}
The Minimum supported Rust version (or MSRV) is1.65.
We use#![deny(unsafe_code)]
for a fullyunsafe
-free crate.
This project is licensed under theApache-2.0.
Unless you explicitly state otherwise, any contribution intentionally submittedfor inclusion in the project by you, shall be licensed as Apache-2.0,without any additional terms or conditions.
About
NMEA 0183 - for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GNSS receivers and many other types of instruments. Defined and controlled by the National Marine Electronics Association (NMEA)
Resources
License
Stars
Watchers
Forks
Releases
Packages0
Languages
- Rust100.0%