Open jamesmontemagno opened 8 years ago
It looks like we are calling and setting the heading:
To TrueHeading not magnetic, so it looks correct. Reading through this: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/GettingHeadings/GettingHeadings.html
The only thing that I can see is that perhaps it needs to check to see if it should use the magnetic:
From iOS docs:
if (newHeading.headingAccuracy < 0)
return;
// Use the true heading if it is valid.
CLLocationDirection theHeading = ((newHeading.trueHeading > 0) ?
newHeading.trueHeading : newHeading.magneticHeading);
self.currentHeading = theHeading;
[self updateHeadingDisplays];
}
From @zezioen on February 12, 2016 10:2
When the UpdatePosition method is called it creates a new Location object and supplies it with the Latitude, Longitude, Accuracy, Altitude & Altitude Accuracy if available, Timestamp and Speed. It does not add the Heading supplied by the CLLocation by default.
The only way to get an 'heading' is by setting the 'includeHeading' in the StartListeningAsync to true but this does not report the heading of the GPS but where the user is pointing their device since it returns the compass heading.
The change I would like to see is to have the Compass heading be separate of the GPS heading and that the GeoLocator plugin reports the GPS heading on iOS instead of the Compass heading.
This issue doesn't seem to be an issue on Android as there the includeHeading doesn't trigger a compass heading but uses the real GPS Heading.
Copied from original issue: jamesmontemagno/Xamarin.Plugins#219