Want to be able to calculate your BMI via WiimoteLib so you can use your board ala WiiFit, heres how its done:
Before we start, for a detailed description of BMI please refer to the following Wikipedia article: http://en.wikipedia.org/wiki/Body_mass_index
The formula for calculating BMI is a simple one and can be defined as follows:
BMI = Weight in kilograms / height in meters² – Metric
BMI = (weight in pounds * 703 ) / height in inches² – Imperial
The following function is passed a WiimoteState value ws and returns BMI as a double. The division by 100 is used to convert a cm user_height value into meters and can quite easily be replaced/removed if desired. Read..
