not a bug but a question

Bug #1247415 reported by Chris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Weight Tracker ODS
New
Undecided
Unassigned

Bug Description

jon I want to understand how the smoothing work is there an explanation of this formula

http://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=65390&p=290465#p290300

where c308 = the Smoothed 'Real' Weight (kg.) & c307 is the previous days data

=IF(OR(A308<startdate;A308>currentdate);"";IF(AND(A308>startdate;ISNUMBER(C307));C307+IF(E308=1;IF(rounding;ROUND(ROUND(B308-C307;1)*smooth;1);(B308-C307)*smooth);0);IF(istrend;trendstart+IF(E308=1;IF(rounding;ROUND(ROUND(B308-trendstart;1)*smooth;1);(B308-trendstart)*smooth);0);IF(istrendlast;trendstartlast+IF(E308=1;IF(rounding;ROUND(ROUND(B308-trendstartlast;1)*smooth;1);(B308-trendstartlast)*smooth);0);B308))))

Revision history for this message
Jon Thysell (jonthysell) wrote : RE: [Bug 1247415] [NEW] not a bug but a question
Download full text (3.2 KiB)

Well, it' been a long while since I looked at this, but essentially I'm following the basic formula in the Hacker's Diet for the smoothed weight, and then used a bunch of IF statements and named cells to to make it pretty in the spreadsheet. Namely I:

* do some rounding (no one is using that accurate of a scale anyway)
* hide cells that occur on days before the person started tracking (no one wants to see a big list of zeroes cause they started mid-year)
* let people specify a starting trend weight (since I only show one year at a time, I need a way of "carrying" the end weight from the previous year or, if the person wants, let them specify a new weight for the year if they feel they need to reset their progress)
* keep repeating the last trend weight for those days when people skip their weigh-in (so no blanks in the graphs)
* maybe some other things I can't remember off of the top of my head

It started simple, but unless you want ugly numbers or gaps or errors anywhere (which are confusing to the user), I had to do some extra work. I don't remember the exact details, only that once I got it working and tested I stopped messing with it. :)

/jon

> Date: Sat, 2 Nov 2013 15:48:56 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 1247415] [NEW] not a bug but a question
>
> Public bug reported:
>
> jon I want to understand how the smoothing work is there an explanation
> of this formula
>
>
> http://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=65390&p=290465#p290300
>
> where c308 = the Smoothed 'Real' Weight (kg.) & c307 is the previous
> days data
>
>
> =IF(OR(A308<startdate;A308>currentdate);"";IF(AND(A308>startdate;ISNUMBER(C307));C307+IF(E308=1;IF(rounding;ROUND(ROUND(B308-C307;1)*smooth;1);(B308-C307)*smooth);0);IF(istrend;trendstart+IF(E308=1;IF(rounding;ROUND(ROUND(B308-trendstart;1)*smooth;1);(B308-trendstart)*smooth);0);IF(istrendlast;trendstartlast+IF(E308=1;IF(rounding;ROUND(ROUND(B308-trendstartlast;1)*smooth;1);(B308-trendstartlast)*smooth);0);B308))))
>
> ** Affects: wtods
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to Weight
> Tracker ODS.
> Matching subscriptions: WTODS Bugs
> https://bugs.launchpad.net/bugs/1247415
>
> Title:
> not a bug but a question
>
> Status in Weight Tracker ODS:
> New
>
> Bug description:
> jon I want to understand how the smoothing work is there an
> explanation of this formula
>
>
> http://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=65390&p=290465#p290300
>
> where c308 = the Smoothed 'Real' Weight (kg.) & c307 is the previous
> days data
>
>
> =IF(OR(A308<startdate;A308>currentdate);"";IF(AND(A308>startdate;ISNUMBER(C307));C307+IF(E308=1;IF(rounding;ROUND(ROUND(B308-C307;1)*smooth;1);(B308-C307)*smooth);0);IF(istrend;trendstart+IF(E308=1;IF(rounding;ROUND(ROUND(B308-trendstart;1)*smooth;1);(B308-trendstart)*smooth);0);IF(istrendlast;trendstartlast+IF(E308=1;IF(rounding;ROUND(ROUND(B308-trendstartlast;1)*smooth;1);(B308-trendstartlast)*smooth);0);B308))))
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/wtods/+bug/12474...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.