- #1
Jarfi
- 384
- 12
A float consists of four bytes. I am using a data stream of floats through radio. This data occasionally is not a float though, and sometimes I'd want to stop the logging of floats of the stream, by inserting a "stop char", which would be checked by the program.
Previously I was using simple LF or NULL, obviously this did not work as many values of floats include a "null", such as 0.00
LF is also included in some float, as it is simply the char equivalent of 13. Statistically almost any character will eventually appear inside a float. So I cannot insert a stop char as there would be too many false positives in the float stream. Is there any byte that is statistically impossible to show up in a float, that could thus be used as a stop char?
Previously I was using simple LF or NULL, obviously this did not work as many values of floats include a "null", such as 0.00
LF is also included in some float, as it is simply the char equivalent of 13. Statistically almost any character will eventually appear inside a float. So I cannot insert a stop char as there would be too many false positives in the float stream. Is there any byte that is statistically impossible to show up in a float, that could thus be used as a stop char?