Skip to content

dcz-self/yanp

This branch is 15 commits ahead of hargoniX/yanp:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1866cbc · May 9, 2022

History

34 Commits
Jul 18, 2019
May 9, 2022
Jul 8, 2019
May 9, 2022
Jul 8, 2019
Mar 10, 2020

Repository files navigation

YANP - Yet Another NMEA Parser Crates.io

A no_std Rust NMEA 0183 sentence parser.

API Docs

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.

About

Yet Another NMEA Parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%