문제

I am about to use iPhone 4's gyroscope/GPS on a game, to detect rotation and translation. As far as I know, the gyroscope can be used to detect rotations in all 3 axis.

But rotations, at least on the horizontal plane can be detected with the compass, tilts can be detected with the accelerometer and positions with the GPS.

Can a combination of compass/accelerometer/GPS create the same level of detection of gyroscope/GPS? (I am thinking of allowing this combination for people without iPhone 4).

Will this work perfectly?

도움이 되었습니까?

해결책

The precision of the gyroscope and accelerometer sensors is much greater than the precision of the compass and GPS. The compass and GPS are for finding out where the device is on the globe, and the gyroscope and accelerometer are good for finding out where the device has moved in the last few milliseconds.

Therefore it depends upon what you're trying to control with the device's movement. Trying to simulate a gyroscope input to control a 3D simulation (like the Jenga game Jobs showed in the keynote that introduced the iPhone 4) will not work perfectly with just the compass/accelerometer/GPS. Figuring out if the device is pointed at the grocery store on the west side of the street instead of the furniture store on the east side of the street in an augmented reality game will work perfectly with just the compass/accelerometer/GPS.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top