nmea icon indicating copy to clipboard operation
nmea copied to clipboard

Formatting/serialization support

Open elpiel opened this issue 2 years ago • 3 comments

  • [x] defmt #92

Other formats we could support (share your thoughts below):

  • [x] serde #102

  • [ ] bincode

  • [x] ~~ufmt~~ defmt seems to be the go-to solution nowadays, this won't be implemented

  • [ ] All of these formats should be optionally configured with a feature of the crate

elpiel avatar Jun 12 '23 12:06 elpiel

For my purposes I needed to modify existing NMEA message into a new NMEA message, and by my surprise, I didn't find a way to display GgaData as str. Is this considered as part of this issue or a separate one? Thank you

k-bx avatar Dec 05 '24 14:12 k-bx

It currently hasn't been considered part of this issue but it can be included.

The challenging part is that this is no longer a parsing job.

I do want to make this feature, however, there might be some challenges in implementing Display for all sentences ( like accuracy of floating numbers).

Are you willing to give a try with a few sentences and open a PR?

elpiel avatar Dec 05 '24 15:12 elpiel

Made a quick and dirty API for anyone interested https://github.com/AeroRust/nmea/pull/137

By no means is it a proposal, just something that works on a limited subset of a real world problem

k-bx avatar Dec 06 '24 22:12 k-bx