Labsmore / pyuscope

Python machine vision platform
BSD 2-Clause "Simplified" License
80 stars 17 forks source link

GRBL: more robust metadata format #357

Closed JohnDMcMaster closed 11 months ago

JohnDMcMaster commented 11 months ago

The current metadata format is subject to single bit errors. I thought it was purely a "Q" format float, but it looks like it contains to float quantization as well.

For example, writing -1925348.096 read back as -1925347.968, a difference of 0.128. This demonstrates a "exponent/mantissa" rounding error and not just a 0.001 error as previously thought.

Some proposals:

Most likely will do the last scheme, with the only question being how to pack the bits.