코어 동작으로보다 정확하거나 빠른 가속도계 판독 값을 얻을 수 있습니까?

StackOverflow https://stackoverflow.com/questions/5492479

문제

CORE 모션 프레임 워크 의이 방법을 사용할 수 있습니다.

- (void)startAccelerometerUpdatesToQueue:(NSOperationQueue *)queue withHandler:(CMAccelerometerHandler)handler
.

의 대안으로

- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
.

Uikit의 UiCceLerationDelegate 메소드.거기에서는 업데이트 빈도를 지정해야합니다.가능한 한 빠르고 정확한 가속 데이터를 얻고 싶습니다.

코어 동작이 여기에 있습니까?그 핵심 동작의 방법으로부터 기대할 수있는 독서의 빈도는 무엇입니까?문서는 그것에 대해 이야기하지 않습니다.

도움이 되었습니까?

해결책

Edit! Now that this answer is OVER A YEAR OLD, certainly it is only of historic value. At this stage, I guess, everyone should only be using CoreMotion and that's that. Hope this historic answer it helps an history students!


My impression is that: CMAttitude and CMDeviceMotion give you the benefit of both the accel'r and the gyro (if the gyro is present). Whereas CMAccelerometerData is only the accel'r. (Exactly like in the old days before Core Motion.)

My impression is that the two specific advantages of CoreMotion are:

(One) the mindboggling convenience of having Quaternions and attitude given to you on a silver platter

(Two) apparently, both gyro and accel'r are used on machines with a gyro, with no extra work from you ... a huge advantage.

I believe there is no actual technical difference in the quality of usage of the accelerometer per se.

Thus: if (for some reason) you want only the accel'r, and you can do the math (if relevant to your task at hand), you could use the old-school accel'r delegate.

It seems that in short, none of us will ever again use the old-school accelerometer delegate!

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