Giter Club home page Giter Club logo

igc-rs's People

Contributors

dbrgn avatar joey9801 avatar turbo87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

turbo87 dbrgn mainrs

igc-rs's Issues

B record does not allow negative altitudes

The IGC file spec specifies that altitudes can be negative (necessary e.g. in the Netherlands). That means u16 would have to change to i16. That however would shrink the range of usable positive values in an unreasonable amount, so I would suggest to bite the bullet and use i32 instead.

Date uses 2000+ years

The crate claims that it is low-level, but it seems that the Date parser makes an assumption which goes against that claim. I would suggest that the low-level parser should only parse the year as a two-digit number and that a higher-level parser could then figure out the correct date on top of that.

If we keep the code like this I would suggest to at least use e.g. 1980 as the baseline, as there are plenty of IGC files from before 2000 around.

Republish to crates.io

The latest version on crates.io is not up to date and is therefore missing essential things like Clone and Serde features.
Latest version on crates.io is from september 2019.

Parsing an entire IGC file

The docs state:

This crate provides a minimal, fast parser for IGC files.

But from the docs, it also seems that it only provides a line/record parser. Or did I overlook something?

I'm aware that I can parse a file by mapping the parsing function on a line iterator, but it would be cool if there were a function to do that in this library (e.g. a parser that can process any type that implements std::io::Read). What do you think?

IGC file writer

While the README claims that this is only a parser, the low-level nature of the structs seems to make it relatively straight-forward to implement writers for them too. Have you thought about that yet, or is that out-of-scope for this crate?

I'm asking because of the discussion in Turbo87/ogn-web-gateway#11

Reason for not implementing common Rust traits

Is there any specific reason why you didn't derive Copy + Clone? Copy is kind of controversial in the way that removing it is a breaking change and if you forsee that the library might not be able to provide Copy implementations in the future I wouldn't suggest deriving it.

But I do not see any reason to not implement Clone for example. serde-related derives could also be added behind a serde feature flag (which is actually automatically added by cargo if you happen to declare your serde dependency as optional).

Would you be open to accept such a PR?

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.