CivicTechTO / tRacket-sensor

Design files and source code for the tRacket noise sensor
https://tracket.info
7 stars 0 forks source link

Convert readings to integers #14

Closed tcsullivan closed 7 months ago

tcsullivan commented 8 months ago

Gabe proposed (and I agree) that we round our decibel readings down to integers (i.e. bytes). We don't know the true accuracy of our current floating-point readings, the microphones and software probably aren't more accurate than +/- 1 dB, and we can get meaningful enough data out of integer decibel readings.

This rounding should probably occur during the JSON conversion so that our dB averaging can continue to benefit from floating-point precision. A floor() and clamp to reasonable limits would probably be enough.