Giter Club home page Giter Club logo

benitojd / nmea Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aerorust/nmea

0.0 0.0 0.0 502 KB

NMEA 0183 - for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GPS receivers and many other types of instruments. It has been defined and is controlled by the National Marine Electronics Association (NMEA)

Home Page: https://crates.io/crates/nmea

License: Other

Rust 100.00%

nmea's Introduction

Version Build Status License Apache-2

Complete documentation can be found on www.docs.rs/nmea

NMEA 0183 sentence parser for Rust.

Supported sentences:

  • BOD (untested, not supported by Nmea::parse())
  • BWC (not supported by Nmea::parse())
  • GBS (untested, not supported by Nmea::parse())
  • GGA
  • GLL
  • GNS
  • GSA
  • GSV
  • MDA
  • MWV
  • RMC
  • TXT
  • VTG

How to contribute

We have an ongoing effort to support as many sentences from NMEA 0183 as possible, starting with the most well-known. If you'd like to contribute by writing a parser for a given message, check out the Supporting additional sentences (AeroRust/nmea#54) issue and contribute in 3 easy steps:

  1. Write a comment - Please write a comment in the issue for the sentence(s) you'd like to implement, you will be mentioned on the task to avoid duplicate implementations.
  2. Implement each sentence alongside at least 1 test in its own module under the ./src/sentences directory using the nom crate.
  3. Open a PR ๐ŸŽ‰

What is NMEA 0183?

NMEA 0183 is a combined electrical and data specification for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GPS receivers and many other types of instruments.

Usage

Add the nmea dependency in your Cargo.toml:

[dependencies]
nmea = "0.3"

For no_std

This crate support no_std without the use of an allocator ( alloc ), just add the nmea crate without the default features:

[dependencies]
nmea = {version = "0.3", default-features = false}

For Rust edition 2015

For Rust 2015 edition you should put this in your crate's lib.rs or main.rs:

extern crate nmea;

To use the NMEA parser create a Nmea struct and feed it with NMEA sentences (only supports GNSS messages, otherwise use the parse_str() and parse_bytes()):

use nmea::Nmea;

fn main() {
    let mut nmea = Nmea::default();
    let gga = "$GPGGA,092750.000,5321.6802,N,00630.3372,W,1,8,1.03,61.7,M,55.2,M,,*76";

    nmea.parse(gga).unwrap();
    println!("{}", nmea);
}

Supported Rust Versions

The Minimum supported Rust version (or MSRV) is 1.56.

Unsafe-free crate

We use #![deny(unsafe_code)] for a fully unsafe-free crate.

License

This project is licensed under the Apache-2.0.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the project by you, shall be licensed as Apache-2.0, without any additional terms or conditions.

nmea's People

Contributors

dushistov avatar elpiel avatar clemarescx avatar hargonix avatar flxo avatar patrickoppel avatar bahelms avatar fparat avatar andrewlipscomb avatar turbo87 avatar afonso360 avatar sknsean avatar zeroerrors avatar yjh0502 avatar jasminfragnaud avatar dylan-dpc avatar gflow33 avatar

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.