CompassReading.HeadingTrueNorth Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the heading in degrees relative to geographic true-north.
public:
property IReference<double> ^ HeadingTrueNorth { IReference<double> ^ get(); };
IReference<double> HeadingTrueNorth();
public System.Nullable<double> HeadingTrueNorth { get; }
var iReference = compassReading.headingTrueNorth;
Public ReadOnly Property HeadingTrueNorth As Nullable(Of Double)
Property Value
The true-north heading.
Remarks
Before retrieving this property, your code should first check to verify that the value is not null. (If the value is null and you attempt to retrieve it, Windows will generate an exception.)
In order to retrieve the declination, your app needs to have access to the device's current location. If the location is not available, the declination defaults to 0 degrees. In this scenario, HeadingTrueNorth equals HeadingMagneticNorth.