ios - iPhone compass presents the wrong heading pitch angle is > about 45° -
this might hard explain geometry careful in spelling out. visible in standard compas app , data in cllocationmanager.
1) when holding phone in portrait orientation, consider pitch angle 0°
2) when pointing camera sky (such taking picture of cloud) pitch angle goes 0° -> 90° 90 degrees straight up.
3) when phone tilted upward (> 0 degrees , rotating on "x" magnetometer axis) , when phone @ (but not exactly) 45 degrees, compass heading rotates 180 degrees. while camera still point "n", compass report "s".
4) next (roughly) 90 degrees, compass heading rotated 180 degrees.
this rotation of heading destructive me , not align accelerometers. there tutorial (i did not find 1 off bat) on using the raw data (x, y, z) clheading data calculate heading data?
the end result want heading of compass match heading of camera.
you can't rely on solely compass heading. see answer you're looking for, , in particular cmattitude object's yaw property compensate pitch angle you're talking about: compensating compass lag gyroscope on iphone 4
Comments
Post a Comment