'Calculate spin frequency from rotation change in degrees
I have an object that rotates in the same direction at a variable speed.
I have the ability to measure the angle of this object in degrees (0-360) every frame (fps variable value, but I can rely on a minimum 30 fps).
How can I measure the rotation speed of this object in any units per 100 ms?
Solution 1:[1]
If we lock the frame rate to a certain fps (let's call it x
), we can use the fact that the time between frames will always be 1/x
seconds. Let us call the angle difference between two frames y
. Assuming you use degrees, if we divide 360 by the change in angle between two frames (360/y
), we end up calculating the number of frames we need to do one full rotation. Multiplying this by 1/x gives us the time it takes to do one full rotation.
To put it simply, do this calculation to find the time taken to do one full rotation at this moment in time: (1/x) * (360/y)
. We will call this result t
.
Next, we find the rotational frequency of the object, which is done by the calculation 1/t
. This is the number of revolutions per second. We can call this value f
.
In order to finally calculate the rotational speed, we will do the following calculation: 2*?*f
. This will give us the rotational speed, with units radians per second
.
To convert this to radians per 100ms, we divide our calculation by 10
.
To summarise, this is the calculation you will need: (0.2*?) / ((1/x) * (360/y))
Resources used: https://www.webassign.net/question_assets/unccolphysmechl1/lab_5/manual.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | dev.dln |