Friday, May 4, 2012

Mid-Term Documentation

For our Mid-term project, we decided to work on a device that would display info about a user's menstrual cycle, in relation to two input-dates. The idea being that based on a 28-day cycle, a user would input the start date of her cycle, and a future date, and receive an output consisting of the day of her cycle (1 out of 28) that would fall on said future date, as well as a reading of certain hormone levels associated with that day of the cycle. This would be useful for instance, if someone trying to conceive wanted to know whether or not to make certain plans on a certain day. 


The difference in days was calculated using the following algorithm: 



function g(y,m,d)
m = (m + 9) % 12
y = y - m/10
return 365*y + y/4 - y/100 + y/400 + (m*306 + 5)/10 + ( d - 1 )

g(y2,m2,d2) - g(y1,m1,d1).

This difference in days was then divided by 28 to return the day value, along with its respective hormone values, as outlined in this Data Set. (organized and visualized by kai). 







No comments:

Post a Comment