attitudeReferenceFrame 的 rawValue 1 是什么意思?
What does rawValue 1 of attitudeReferenceFrame mean?
我正在尝试找出我用来跟踪陀螺仪数据的 CMMotionManager 的参考系。当我执行以下行时
let referenceFrame = self.motionManager.attitudeReferenceFrame
print("Reference frame = \(referenceFrame)")
我得到以下输出
Reference frame = CMAttitudeReferenceFrame(rawValue: 1)
CMAttitudeReferenceFrame 有 4 个常量
Constants
static var xArbitraryZVertical: CMAttitudeReferenceFrame Describes a
reference frame in which the Z axis is vertical and the X axis points
in an arbitrary direction in the horizontal plane.
static var xArbitraryCorrectedZVertical: CMAttitudeReferenceFrame
Describes the same reference frame as xArbitraryZVertical except that
the magnetometer, when available and calibrated, is used to improve
long-term yaw accuracy. Using this constant instead of
xArbitraryZVertical results in increased CPU usage.
static var xMagneticNorthZVertical: CMAttitudeReferenceFrame Describes
a reference frame in which the Z axis is vertical and the X axis
points toward magnetic north. Note that using this reference frame may
require device movement to calibrate the magnetometer.
static var xTrueNorthZVertical: CMAttitudeReferenceFrame Describes a
reference frame in which the Z axis is vertical and the X axis points
toward true north. Note that using this reference frame may require
device movement to calibrate the magnetometer. It also requires the
location to be available in order to calculate the difference between
magnetic and true north.
是说第二个常数的rawValue为1吗?
docs 说第二个值 1 << 1
(即 1),所以是。
我正在尝试找出我用来跟踪陀螺仪数据的 CMMotionManager 的参考系。当我执行以下行时
let referenceFrame = self.motionManager.attitudeReferenceFrame
print("Reference frame = \(referenceFrame)")
我得到以下输出
Reference frame = CMAttitudeReferenceFrame(rawValue: 1)
CMAttitudeReferenceFrame 有 4 个常量
Constants
static var xArbitraryZVertical: CMAttitudeReferenceFrame Describes a reference frame in which the Z axis is vertical and the X axis points in an arbitrary direction in the horizontal plane.
static var xArbitraryCorrectedZVertical: CMAttitudeReferenceFrame Describes the same reference frame as xArbitraryZVertical except that the magnetometer, when available and calibrated, is used to improve long-term yaw accuracy. Using this constant instead of xArbitraryZVertical results in increased CPU usage.
static var xMagneticNorthZVertical: CMAttitudeReferenceFrame Describes a reference frame in which the Z axis is vertical and the X axis points toward magnetic north. Note that using this reference frame may require device movement to calibrate the magnetometer.
static var xTrueNorthZVertical: CMAttitudeReferenceFrame Describes a reference frame in which the Z axis is vertical and the X axis points toward true north. Note that using this reference frame may require device movement to calibrate the magnetometer. It also requires the location to be available in order to calculate the difference between magnetic and true north.
是说第二个常数的rawValue为1吗?
docs 说第二个值 1 << 1
(即 1),所以是。