iPhone - 陀螺仪测量什么?我可以在所有轴上获得绝对度数测量吗?

问题描述:

我对iPhone开发相对较新,我正在使用Core Motion玩陀螺仪。经过几次测试后,这是我的问题。

I am relatively new to iPhone development and I am playing with the gyroscope, using Core Motion. After a few tests, this is my question.

陀螺仪测量的确切信息是什么?绝对角度?我的意思是,假设我手持肖像,正好是90度并开始采样。这些可能不是正确的值,但假设在这个位置,陀螺仪给我0度,0度和0度的偏航,俯仰和滚动。

What information is exactly the gyroscope measuring? absolute angles? I mean, suppose I hold my phone in portrait, at exactly 90 degrees and start sampling. These may be not the correct values, but suppose that at this position, the gyroscope gives me 0, 0 and 0 degrees for yaw, pitch and roll.

现在我扔我的iphone在空中,当它上升时,它随机滚动所有轴上的大量完整转弯并返回到我之前与之前相同的位置。陀螺仪是否会读取0,0,0(意味着它具有与之前相同的位置=绝对角度)?

Now I throw my iphone in the air and as it goes up it rolls at random a high number of full turns in all axis and returns to my hand at the same position as before. Will the gyroscope read 0,0,0 (meaning that it has the same position as before = absolute angle) or not?

如果没有,有办法测量所有轴的绝对度数吗?作为绝对度,我的意思是假设0,0,0为采样开始时的位置。

If not, there's a way to measure absolute degrees in all axis? As absolute degrees I mean assuming 0,0,0 as the position it was when the sampling started.

谢谢

iPhone使用加速度计进行内部角度测量,这意味着它们与地球的引力相关。除非你需要这个程序在太空中工作,否则这就像你将要获得的绝对一样。

The iPhone uses accelerometers for its internal angle measurements, which means they are relative to the Earth's gravity. That's about as absolute as you're going to get, unless you need this program to work in space, too.