Git Product home page Git Product logo

yanp's Introduction

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.

yanp's People

Contributors

elpiel avatar hargonix avatar

Stargazers

 avatar  avatar  avatar  avatar

yanp's Issues

Panic on invalid input

parse_nmea_sentence(b"*74\r\n")

panics with message:

panicked at 'index 7 out of range for slice of length 5', src/libcore/slice/mod.rs:2583:5

The library should not panic on invalid input.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.