Fix heading reading. When trueHeading is invalid < 0, use magneticHeading

Fix heading reading. When trueHeading is invalid, use magneticHeading as mentioned in Apple's documentation:
https://developer.apple.com/library/ios/documentation/userexperience/conceptual/LocationAwarenessPG/GettingHeadings/GettingHeadings.html