Crates.io | yanp |
lib.rs | yanp |
version | 0.1.1 |
source | src |
created_at | 2019-07-18 11:29:04.99852 |
updated_at | 2019-07-18 11:53:29.434489 |
description | A no_std nmea sentence parser |
homepage | https://github.com/hargoniX/yanp |
repository | |
max_upload_size | |
id | 149845 |
size | 54,850 |
A no_std Rust NMEA 0183 sentence parser.
Put this in your Cargo.toml:
#[dependencies]
yanp = "0.1.1"
And in your code:
use yanp::parse_nmea_sentence;
fn main(){
match parse_nmea_sentence(b"$GPGLL,4916.45,N,12311.12,W,225444,A,*1D\r\n") {
Ok(val) => println!("{:#?}", val),
Err(e) => println!("{:#?}", e),
};
}
It is very important that the \r\n is included in the sentence as the library depends on this for a few slice operations as of now.
As of now the GNS sentence requires the alloc feature to be selected.