sylvandb / gruvin9x

Automatically exported from code.google.com/p/gruvin9x
0 stars 0 forks source link

Re-work bat voltage averaging as a running 'this plus last' average #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Note to re-work bat voltage averaging (BATVOLTS=AVERAGE) as a running 'this 
plus last' average instead of averaging the previous 10 live samples -- for 
better efficiency.

Gruvin.

Original issue reported on code.google.com by gru...@gmail.com on 12 Nov 2010 at 7:24

GoogleCodeExporter commented 8 years ago
Why? Because storing the last 10 raw samples and averaging only from those is 
both wasteful of SRAM and inferior to a running average.

It will be important to start the initial voltage sample at something very 
close to actual (say, an average of three quick-fire samples after the first 
non-zero reading) so that the running average doesn't start at zero and slowly 
creep up to actual voltage.

Original comment by gru...@gmail.com on 15 Nov 2010 at 11:46

GoogleCodeExporter commented 8 years ago
Done. A 7-cell virtual history, running average is now standard and seems to be 
as stable as the previous, wasteful, 10-cell actual history system.

Original comment by gru...@gmail.com on 20 Dec 2010 at 8:46

GoogleCodeExporter commented 8 years ago

Original comment by gru...@gmail.com on 23 Sep 2011 at 1:50