Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Render to nmea #137

Closed
wants to merge 8 commits into from
Closed

WIP Render to nmea #137

wants to merge 8 commits into from

Conversation

k-bx
Copy link

@k-bx k-bx commented Dec 6, 2024

This is a dirty WIP that's more of an idea beginning rather than a complete implementation. Most likely to be closed and re-imagined.

Related to #100

@k-bx k-bx mentioned this pull request Dec 6, 2024
5 tasks
@elpiel
Copy link
Member

elpiel commented Dec 12, 2024

I would suggest to call the feature "display" and for you to check out the parse_display crate. It might be worth implementing to each *Data struct and any support structures + it will give us control over the formatting (e.f. how many numbers after the decimal point to have the number).

Let me know what you think.
As for the whole sentence, we would still need a custom impl to add the checksum and starting symbol + talker.

Let's start with 1 or 2 *Data structs and see how it looks

@k-bx
Copy link
Author

k-bx commented Dec 13, 2024

@elpiel I ended up not using the library since my microcontroller is too weak and needs much optimized algorithm, closing this PR, would be happy for anyone to catch up on this

@k-bx k-bx closed this Dec 13, 2024
@elpiel
Copy link
Member

elpiel commented Dec 20, 2024

@k-bx what do you mean by "much more optimized"?

@k-bx
Copy link
Author

k-bx commented Dec 22, 2024

@elpiel I mean not working with strings, operating directly on Vec, not parsing NMEA sentences fully but doing ad-hoc logic with a subset of bytes.

@Dushistov
Copy link
Collaborator

The proposal to add API to rust stdlib to convert integer directly from bytes was accepted: rust-lang/libs-team#469 . When new API was added I suppose we can drop conversation to utf-8 before parsing nmea sentences and work directly with bytes.

@elpiel
Copy link
Member

elpiel commented Dec 24, 2024

This is great @Dushistov !

I will create an issue for working on printing and generating the string representation of the sentences.

I think we could start with an experimental feature first, even if it's not finished nor optimised for beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants