Skip to main content
API Reference SwiftyNsdk NsdkFrameData

CompassData

Compass and magnetometer data for heading information....

Declaration

struct CompassData

Summary

Compass and magnetometer data for heading information. This structure contains orientation data from the device's compass, providing heading information that can be used for location-based AR experiences and waypoint navigation.


Constructors

init(timestampMs: UInt64, headingAccuracy: Float, trueHeading: Float)

Summary

Creates compass data with the specified parameters.
- Parameters:
- timestampMs: Timestamp of the compass reading in milliseconds
- headingAccuracy: Accuracy of the heading measurement in degrees
- trueHeading: True heading relative to geographic north in degrees


Properties

NameTypeSummary
var headingAccuracyFloat
Accuracy of the heading measurement (in degrees).
Lower values indicate more accurate readings. Values above 15-20 degrees
may indicate poor compass calibration or magnetic interference.
var timestampMsUInt64
Timestamp when the compass reading was captured (in milliseconds).
var trueHeadingFloat
True heading relative to geographic north (in degrees).
This value is corrected for magnetic declination and represents
the actual direction relative to true north (0-360 degrees).

Operators

NameTypeSummary
static func != Bool
Returns a Boolean value indicating whether two values are not equal.
Inequality is the inverse of equality. For any values a and b, a != b
implies that a == b is false.
This is the default implementation of the not-equal-to operator (!=)
for any type that conforms to Equatable.
- Parameters:
- lhs: A value to compare.
- rhs: Another value to compare.

Relationships

conforms to: Swift.Equatable