YANP - Yet Another NMEA Parser ![Crates.io](https://camo.githubusercontent.com/1489be1ab66fbe98960c18c6864f27c1197781889ee7d13c647905c503807759/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f79616e703f7374796c653d666c61742d737175617265)
A no_std Rust NMEA 0183 sentence parser.
Currently supported Sentences:
- BOD
- BWC
- GBS
- GGA
- GLL
- GSA
- GNS
- GSV
- HDT
- RMA
- RMB
- RMC
- STN
- VBW
- VTG
- WPL
Usage
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.