AeroRust / nmea

NMEA 0183 - for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GNSS receivers and many other types of instruments. Defined and controlled by the National Marine Electronics Association (NMEA)
https://crates.io/crates/nmea
Other
57 stars 41 forks source link

Add AAM sentence parser #62

Closed bahelms closed 1 year ago

bahelms commented 1 year ago

Add AAM sentence parser

bahelms commented 1 year ago

@elpiel I have a question about the AAM sentence. I see that Nmea::parse does not support all sentences. It would seem AAM should also not be supported here based on the docs:

/// Parse any NMEA sentence and stores the result of sentences that include:
/// - altitude
/// - latitude and longitude
/// - speed_over_ground
/// - and other
///
/// The type of sentence is returned if implemented and valid.
pub fn parse(&mut self, sentence: &'a str) -> Result<SentenceType, Error<'a>> {

Is this correct?

elpiel commented 1 year ago

Yes, that is correct.

Thank you for the PR 🎉

elpiel commented 1 year ago

@bahelms should I take a look at the PR or do you need to finish something else first? There is also a conflict right now, would ou mind resolving it?

bahelms commented 1 year ago

@bahelms should I take a look at the PR or do you need to finish something else first? There is also a conflict right now, would ou mind resolving it?

@elpiel Yes, it's ready for review now. Thanks!

codecov[bot] commented 1 year ago

Codecov Report

Base: 78.54% // Head: 79.22% // Increases project coverage by +0.67% :tada:

Coverage data is based on head (08ccbbb) compared to base (d5f1209). Patch coverage: 96.15% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #62 +/- ## ========================================== + Coverage 78.54% 79.22% +0.67% ========================================== Files 21 22 +1 Lines 797 823 +26 ========================================== + Hits 626 652 +26 Misses 171 171 ``` | [Impacted Files](https://codecov.io/gh/AeroRust/nmea/pull/62?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust) | Coverage Δ | | |---|---|---| | [src/parse.rs](https://codecov.io/gh/AeroRust/nmea/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3BhcnNlLnJz) | `80.39% <ø> (ø)` | | | [src/parser.rs](https://codecov.io/gh/AeroRust/nmea/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3BhcnNlci5ycw==) | `79.36% <0.00%> (+0.08%)` | :arrow_up: | | [src/sentences/mod.rs](https://codecov.io/gh/AeroRust/nmea/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3NlbnRlbmNlcy9tb2QucnM=) | `0.00% <ø> (ø)` | | | [src/sentences/aam.rs](https://codecov.io/gh/AeroRust/nmea/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3NlbnRlbmNlcy9hYW0ucnM=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

bahelms commented 1 year ago

LGTM. A BIG Thanks 🎉 for contributing to the project!

PS: Let's see if CI runs successfully and we can merge it.

Thank you! My pleasure.