Is there a way to get relative rotation from the motion of the nucleus?
I need: how much it rotates on one axis and in which direction (+ sign = counterclockwise, - = clockwise, in accordance with the right rule).
I found the rotationRate property, but now I'm sure how to extract an angle from it, as this gives me radians per second.
In recent days, I have been doing all kinds of things, but nothing has given me stable values. I tried to run a timed sample of kernel motion data using NSTimer and calculate the difference between the two samples, so I would get how much it has rotated since the last sample, but from time to time it gives me crazy numbers like 13600 degrees even when the iPhone is standing on the table.
Any thoughts on how this can be done?
thank
source
share