You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to create a Proof of concept with 1 or more sentences for implementing Display for sentences.
This could be used to create receivers firmware or any other device that requires generating and sending NMEA 0183.
use parse_display crate to format the strings easily
Caveats
This proof of concept is required because sentences use floating point numbers and given the maximum sentence length, this could lead to problems when displaying the sentences.
Length of generated sentences
floating points rounding and accuracy (fractional part of the number)
The text was updated successfully, but these errors were encountered:
This proof of concept is required because sentences use floating point numbers
floating points rounding and accuracy (fractional part of the number)
In fact, if we choose proper type to represent all numbers from nmea sentences we can easily get the proper result,
but if choose wrong type, f32 for example, where only f64 enough, then we would get problem.
So converting back data to nmea help to test proper choice of types.
But I not sure that Display trait is the proper choice. It is for human readable representation,
may be it should From trait that convert to String|Vec<u8>|[u8; CONTANT],
or may be custom trait with suitable name, like RestoreOrigin.
I think f32 should be enough in most cases although devices might use different accuracy.
See the other issue for more details.
I actually think f32 is the right way to go or go as far as Fixed (w/ the fixed crate) numbers in some cases.
We could use our own trait, I believe that NMEA 0183, being a human readable format (aka string) can really benefit from implementing Display.
Maybe only the whole sentence can have a function that creates a fixed-length String alongside the Display impl.
We want to create a Proof of concept with 1 or more sentences for implementing Display for sentences.
This could be used to create receivers firmware or any other device that requires generating and sending NMEA 0183.
parse_display
crate to format the strings easilyCaveats
This proof of concept is required because sentences use floating point numbers and given the maximum sentence length, this could lead to problems when displaying the sentences.
The text was updated successfully, but these errors were encountered: