[PATCH] Fix broken average SAC calculation

Miika Turkia miika.turkia at gmail.com
Thu Mar 29 22:56:56 PDT 2012


On Fri, Mar 30, 2012 at 8:42 AM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
> On Thu, Mar 29, 2012 at 10:10 PM, Miika Turkia <miika.turkia at gmail.com> wrote:
>> old_sac_time was always 0 when calculating average air consumption. Thus
>> the results were incorrect. Moving the counter to stats_t structure as
>> suggested by Linus.
>
> Thanks, looks ok now, but when I started "testing" this patch I
> realized that I don't see what value it miscalculates.
>
> I'm sorry, can you give an example of the error..

The average SAC value on stats page is the one in question. When
having plenty of dives on your log it looks fine (even though it is
not correct after all). But the problem should be clearly visible when
you select just a few dives for displaying the statistics. Just play
around with 2 to 5 selected dives.

miika


More information about the subsurface mailing list