I am making a better one using the accelerometer, the math is simple, but, the accelerometer might not be accurate enough. for anyone who likes math (not me) the formula is: 385.82677126 * accel.y * frame rate(decimal)
385.82677126 is gravity in inches and (1 / 30) is our target frame rate
its simple enough, when the zune accelerates the accelerometer gives me a decimal g-force, multiply that by 9.8MPS^2 or (in our case we convert that to inches) and it will give us a large number, by multiply that by the frame rate, which, is how many times we run this logic per second, and you have the amount of inches you have moved in that amount of time. += this to a decimal and you have an endless ruler. But, its not as simple as that, for one, gravity varies from place to place (it really does, in small amounts), if the zune is not perfectly flat it will not work, but, using more math we can solve that (and let you meusure on vertical faces ect.) and the fact that the accelorometer is not 100% accurate, aside from that it should be fun to mess with.
__________________ go on, buy the melon you started wanting a second ago...
Last edited by itsthatsguy; 12-09-2009 at 05:50 PM.
and i am way ahead of you, my current version does meters, inches, feet, miles, cm, and mm. Miles are a bit weird, but, if i get the math right they should be able to measure really long distances
__________________ go on, buy the melon you started wanting a second ago...