我正在开发一个小型室内导航应用程序,我在其中使用陀螺仪和指南针来确定设备方向。我使用陀螺仪来平滑罗盘数据。我的传感器融合如下所示。这是我的motionHandler,一切都在这里发生。//ListentoeventsfromthemotionManagermotionHandler=^(CMDeviceMotion*motion,NSError*error){__blockfloatheading;heading=mHeading;CMAttitude*currentAttitude=motion.attitude;//Initialheadingsettingif(lastHeadi