Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hargonix/yanp
Yet Another NMEA Parser
https://github.com/hargonix/yanp
gps nmea no-std parsing rust
Last synced: 4 months ago
JSON representation
Yet Another NMEA Parser
- Host: GitHub
- URL: https://github.com/hargonix/yanp
- Owner: hargoniX
- License: mit
- Created: 2019-07-08T13:29:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-11T07:17:31.000Z (almost 5 years ago)
- Last Synced: 2024-08-08T15:43:52.616Z (6 months ago)
- Topics: gps, nmea, no-std, parsing, rust
- Language: Rust
- Size: 51.8 KB
- Stars: 4
- Watchers: 0
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YANP - Yet Another NMEA Parser ![Crates.io](https://img.shields.io/crates/v/yanp?style=flat-square)
A no_std Rust NMEA 0183 sentence parser.**[API Docs](https://docs.rs/yanp/0.1.1/yanp/)**
## 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:
```toml
#[dependencies]
yanp = "0.1.1"
```
And in your code:
```rs
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.