Crates.io | nmea |
lib.rs | nmea |
version | 0.7.0 |
source | src |
created_at | 2016-05-20 17:23:35.87645 |
updated_at | 2024-10-12 08:13:23.139764 |
description | Simple NMEA 0183 parser |
homepage | |
repository | https://github.com/AeroRust/nmea |
max_upload_size | |
id | 5119 |
size | 1,243,272 |
Complete documentation can be found on www.docs.rs/nmea
Supported sentences:
NMEA Standard Sentences
Other Sentences
Vendor Extensions
* Nmea::parse()
supported sentences
We have an ongoing effort to support as many sentences from NMEA 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 the Supporting additional sentences (AeroRust/nmea#54) issue and contribute in 3 easy steps:
./src/sentences
directory using the nom
crate.NMEA 0183 is a combined electrical and data specification for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GPS receivers and many other types of instruments.
Add the nmea
dependency in your Cargo.toml
:
[dependencies]
nmea = "0.7"
no_std
This crate support no_std
without the use of an allocator ( alloc
),
just add the nmea
crate without the default features:
[dependencies]
nmea = { version = "0.7", default-features = false }
To use the NMEA parser create a Nmea
struct and feed it with NMEA sentences (only supports GNSS
messages, otherwise use the parse_str()
and parse_bytes()
):
use nmea::Nmea;
fn main() {
let mut 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) is 1.70.0.
We use #![deny(unsafe_code)]
for a fully unsafe
-free crate.
This project is licensed under the Apache-2.0.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the project by you, shall be licensed as Apache-2.0, without any additional terms or conditions.