Class

CLHeading

A data object containing a device's azimuth relative to true or magnetic north.

Overview

A CLHeading object contains heading data generated by a CLLocation​Manager object. The heading data consists of computed values for true and magnetic north. It also includes the raw data for the three-dimensional vector used to compute those values.

Typically, you do not create instances of this class yourself, nor do you subclass it. Instead, you receive instances of this class through the delegate assigned to the CLLocation​Manager object whose start​Updating​Heading() method you called.

Symbols

Accessing the Heading Attributes

var magnetic​Heading:​ CLLocation​Direction

The heading (measured in degrees) relative to magnetic north.

var true​Heading:​ CLLocation​Direction

The heading (measured in degrees) relative to true north.

var heading​Accuracy:​ CLLocation​Direction

The maximum deviation (measured in degrees) between the reported heading and the true geomagnetic heading.

var timestamp:​ Date

The time at which this heading was determined.

Accessing the Raw Heading Data

var x:​ CLHeading​Component​Value

The geomagnetic data (measured in microteslas) for the x-axis.

var y:​ CLHeading​Component​Value

The geomagnetic data (measured in microteslas) for the y-axis.

var z:​ CLHeading​Component​Value

The geomagnetic data (measured in microteslas) for the z-axis.

Constants

CLHeading​Component​Value

A type used to report magnetic differences reported by the onboard hardware.