<doc>
	<legacy_id></legacy_id>
	<name>mobileCurrentHeading</name>
	<type>function</type>

	<syntax>
		<example>mobileCurrentHeading()</example>
	</syntax>

	<synonyms>
		<synonym>iphoneCurrentHeading()</synonym>
	</synonyms>

	<summary>Returns the current heading of the device.</summary>

	<examples>
<example>get mobileCurrentHeading()</example>
<example>put mobileCurrentHeading() into theHeading</example>
	</examples>

	<history>
		<introduced version="4.6.1">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="5.5">Android support added</changed>
	</history>

	<objects>
	</objects>

	<platforms>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
		<category>Sensors</category>
	</classification>

	<references>
		<function tag="mobileCanTrackHeading">mobileCanTrackHeading Function</function>
		<function tag="mobileSensorReading">mobileSensorReading Function</function>
		<command tag="mobileStartTrackingSensor">mobileStartTrackingSensor Command</command>
		<command tag="mobileStopTrackingSensor">mobileStopTrackingSensor Command</command>
		<message tag="headingChanged">headingChanged Message</message>
		<message tag="trackingError">trackingError Message</message>
	</references>

	<description>
	<overview>Use the mobileCurrentHeading function to find the current heading of the device.</overview>

		<parameters>
		</parameters>

	<value>If heading tracking has been enabled the <b>mobileCurrentHeading</b> funtion returns an array with the following keys:<p></p><p><b>accuracy </b>- The maximum deviation (measured in degrees) between the reported heading and true geomagnetic heading. The lower the value, the more accurate the reading.</p><p><b>magnetic heading</b> - The heading (measured in degrees) relative to magnetic north.</p><p><b>true heading</b> - The heading (measured in degrees) relative to true north. If the true heading could not be calculated (usually due to heading tracking not being enabled, or lack of calibration), this key will not be present.</p><p><b>heading</b> - The true heading if available, otherwise the magnetic heading.</p><p><b>x, y, z</b> - The geomagnetic data (measured in microteslas) for each of the x, y and z axes.</p><p><b>timestamp</b> - The time at which the measurement was taken, in seconds since 1970.     </p></value>
	<comments></comments>
	</description>
</doc>