Modify code for longer LEQ_PERIOD
Opened this issue · 1 comments
Hi,
The current program calculates and displays the LEQ every 1 second. How can I modify the code to display the LEQ every 5 minutes instead?
If I were to change LED_PERIOD to 300, then SAMPLES_LEQ will become 14,400,000, and the accumulated Leq sum would probably overflow?
I am not familar with calculating LEQ, but I presume I can't just add up the LEQs for every one second and divide it by 300 (after 5 minutes) to get the average LEQ for 5 minutes right?
Hi @KianYeo, you can't add-and-average Leq
values, you would need to integrate them (see: http://www.gracey.co.uk/basics/leq-b1.htm). However, even with large LED_PERIOD
values, it is unlikely to overload double-precision floating-point Leq_sum_sqr
(max ~1.7e+308)...