从旋转变化计算自旋频率
我的对象以可变速度以相同方向旋转。
我有能力在每个帧(FPS变量值,但我可以依靠最低30 fps)中测量该对象的角度(0-360)。
如何以每100毫秒的任何单位来测量此对象的旋转速度?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我们将帧速率锁定到某个fps(我们将其称为
x
),则可以使用以下事实:帧之间的时间始终为1/x
秒。让我们调用两个帧之间的角度差<代码> y 。假设您使用学位,如果我们将360除以两个帧之间的角度(360/y
),我们最终会计算我们需要进行一个完整旋转的帧数。将其乘以1/X为我们提供了进行一次完整旋转所需的时间。简而言之,进行此计算,以找到此刻进行一次完整旋转所花费的时间:
(1/x) *(360/y)
。我们将称此结果t
。接下来,我们找到对象的旋转频率,该对象由计算
1/t
完成。这是每秒革命的数量。我们可以调用此值f
。为了最终计算旋转速度,我们将进行以下计算:
2*π*f
。这将为我们提供旋转速度,单位弧度每秒
。要将其转换为每100ms的弧度,我们将计算除以10 。
总而言之,这是您需要的计算:
(0.2 *π)/((1/x) *(360/y))
所使用的资源:
https://www.webassign.net/question_assets/unccolphysmechl1/lab_5/manual. html
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 be1/x
seconds. Let us call the angle difference between two framesy
. 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 resultt
.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 valuef
.In order to finally calculate the rotational speed, we will do the following calculation:
2*π*f
. This will give us the rotational speed, with unitsradians 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