MaeFat

(Methods of Weight Trend Calculation)
(Settings)
Line 30: Line 30:
[[Image:maeFatSettings.png|thumb|200px|alt=maeFat Settings|Settings]]
[[Image:maeFatSettings.png|thumb|200px|alt=maeFat Settings|Settings]]
-
The Settings page allows you to change how the program operates. It must be used initially to enter your height. Before entering your height, you should select centimeter units if that's what you wish to use (rather than inches). You may also select metric units for weight, and the format for displaying the dates. If you select nonjudgemental colors, neutral colors will be used to display the data, otherwise green will be used to indicate weight loss, red will be used for weight gain, and the BMI data will be color coded. The last thing the Settings page allows you to set is the time interval used to produce the default plot page.
+
The Settings page allows you to change how the program operates. It must be used initially to enter your height. Before entering your height, you should select centimeter units if that's what you wish to use (rather than inches). You may also select metric units for weight, and the format for displaying the dates. If you select nonjudgemental colors, neutral colors will be used to display the data, otherwise green will be used to indicate weight loss, red will be used for weight gain, and the BMI data will be color coded. The BMI color code is
 +
 
 +
Red:    Obese or Severely Underweight
 +
Yellow: Overweight or Underweight
 +
Green:  Normal weight range
You may also set a target weight, which can be displayed as a green line on the weight vs time plot.
You may also set a target weight, which can be displayed as a green line on the weight vs time plot.
 +
 +
The last thing the Settings page allows you to set is the time interval used to produce the default plot page.
 +
{{clear}}
{{clear}}

Revision as of 21:15, 15 March 2011

maeFat is a Maemo 5 app for the N900 which helps you to track your weight history. It is similar to the Hacker's Diet tools, but not identical to them. It allows you to log your weight, plot that data along with an exponentially weighted running average, and determine caloric excess/deficit over a variety of time intervals. maeFat is open source and cost-free.

Contents

The Initial Display

Screenshot of maeFat Initial Screen
Initial Screen

When you initially run the program, there will be no data available, and you will see the display shown on the right. You must either enter data through the app, or copy a data file of your own into the proper location. Also, you must use the Settings menu option in order to enter your height (which is used to calculate your Body Mass Index (BMI).

Menu

Screenshot of maeFat Menu
Menu

The image to the right shows the maeFat menu. To enter data, select the Data Entry option. The Log option allows you to edit entries which have already been entered. The Time Analysis option displays statistics about the data which has been entered. The Settings option allows you to change how the program operates, for example whether or not metric units are used. The Help option displays this page in the unit's web browser, and the About options shows a page containing copyright and other information about the program.

Data Entry

maeFat Data Entry
Data Entry

The Data Entry page allows you to enter new weight data. It does that without requiring you to use the N900's keyboard. It contains hildon Date and Time widgets preloaded with the current time and date. You can use these to change the time tag for the weight data you are entering, if you don't want to use the current time. The Weight widget is used to enter the weight. If no data has yet been entered, it will be preloaded with 150 pounds (unless you chosen metric units), otherwise it will be preloaded with the most recent weight entry. The comments widget allows you to tag the entry with an optional text comment. If you press the arrow at the upper right corner (the normal way to exit a page) the new data will be entered into the log. If you decide that you don't want to make an entry, push the Cancel Data Entry button.

If your weight is unchanged from your last entry, all you must do to enter your daily data point is go to the Data Entry page and immediately exit from it, because that will enter another data point with the current time and the same weight value as your most recent entry.

It is recommended that you not enter more than one weight entry per day, although the software allows you to do so if you wish to. If you enter more than 33 weight values per month, the Edit page will not work properly.

Settings

maeFat Settings
Settings

The Settings page allows you to change how the program operates. It must be used initially to enter your height. Before entering your height, you should select centimeter units if that's what you wish to use (rather than inches). You may also select metric units for weight, and the format for displaying the dates. If you select nonjudgemental colors, neutral colors will be used to display the data, otherwise green will be used to indicate weight loss, red will be used for weight gain, and the BMI data will be color coded. The BMI color code is

Red:    Obese or Severely Underweight
Yellow: Overweight or Underweight
Green:  Normal weight range

You may also set a target weight, which can be displayed as a green line on the weight vs time plot.

The last thing the Settings page allows you to set is the time interval used to produce the default plot page.


Plot Page

maeFat Plot
Plot

The program's default page shows a plot of the data you have entered, and a trend line. The yellow trend line is the exponentially weighted running average of the weight data. The scale on the left of the plot is in the weight units you have chosen. On the right is shown the corresponding BMI values. The line at the bottom presents your current weight (from the trend line, not any particular data entry), the weight lost or gained over the last week (regardless of the plot interval) and the number of excess/deficit calories per day which will produce that weight change.

Trend Page

maeFat Trend Page
Trend Page

The Trend Page shows statistical information about your weight data over differing time intervals. Initially, when little data is available, it will show only the values for the entire log history. Eventually data for the last week, fortnight (2 weeks), month (30 days), quarter (91 days) and year will be shown, when enough data is available to calculate those values.

Methods of Weight Trend Calculation

maeFat Trend Formulae
Trend Formulae

The trend line (shown in yellow on the Plot Page) and the trend values shown on the Trend Page are calculated using one of the two formulae shown on the right. The Settings page allows you to chose which formula to use. If you enter a weight value every day, the two formulae will give nearly identical results. The difference between them appears if you have gaps in your weight log. The Hacker Diet formula does not take elapsed time into account when calculating the trend. So if you enter a weight after having not weighed yourself for a month, the Hacker Diet formula will give as much (mathematical) weight to the penultimate and earlier weight values as they would have had if you had no gap in your weight log. The default formula used by maeFat takes the time interval into account, and will decrease the (mathematical) weight given to entries which were made long ago. The Hacker Diet formula is less computationally expensive, so if you have a weight log with many thousands of entries, it will be faster to use the Hacker Diet formula, which will also save a tiny amount of battery power.


The weight values shown on the Trend Page are calculated with these formulae, and the caloric excess/deficit values are calculated using the difference in trend value over the specified interval, with the assumption that one pound of weight change corresponds to 3500 calories.

Editing the Log

maeFat Edit Choose Month Page
Edit Choose Month Page

If you select the Edit option, you will first be presented with a page containing a widget which allows you to select which month's data you wish to edit. This widget will be loaded with every month for which data is available.

maeFat Edit List
Edit List

Once you have selected the month, you will be presented with a page listing all the data entries for that month. If you press on one of those entries, you will be sent to the Data Entry page, which will be preloaded with the selected day's values, where you may change the values. You may also press the Delete button to remove the entry entirely.

Data File Format / Entering Many Data Points

If you have a pre-existing weight log that you wish to enter, it will be very tedious to enter each point individually using the GUI interface. It makes much more sense to convert your weight log into the format maeFat uses using some external script. The data is kept in the file $HOME/.maeFat/data. A backup copy is kept on the microSD card (so that if you have to reflash the N900, your log won't be lost) in the file /media/mmc1/.maeFat/data . The data file is a flat text file, with one line per log entry, using the following format:

DD/MM/YYYY HH:MM XXX.X # Optional comment here

where DD is the day of the month, MM is the number of the month, YYYY is the year, HH is the hour, MM is the minutes, and XXX.X is the weight. The weight must be in pounds, even if maeFat has been configured to display metric units. Any comment must be preceded by a #, but no # is needed for entries without a comment.

There is no need for you to load your data into the backup file, because it will be rewritten automatically once any data is entered or edited with the program's GUI.

Entering Weights Outside the Default Range

When the program is first run, it has no way of knowing what the proper range is for the weight selector widget on the Data Entry page. The weight selector is initially loaded with weight values from 50 to 250 pounds (or 23 to 113 kg, if metric units have been selected). If you wish to enter an initial weight which falls outside of that range, you can just use a text editor to edit the /media/mmc1/.maeFat/data file, with the format described above, to enter your initial weight. After the first value has been entered, the weight selector will display a range of weights near that value when the Data Entry page is displayed, so only the first value will need to be entered with the text editor.

Availability

maeFat is available in the Extras-devel repository. It will be moved to Extras-testing soon.

Support Information

If you have questions, comments or requests concerning this program, please send them to orrery.moko@gmail.com. maeFat uses the official Maemo bugzilla for bug tracking.