Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.10
-
None
-
Requested for iOS/Android
Description
Qt currently only supports magnetic north readings. It should be possible to get true north readings, (and declination) from Qt to properly orient maps and the user.
This article describes the steps in detail: https://www.codeproject.com/Articles/1112064/Calculating-True-North-for-IoT-Applications
But in general you need to plug in the current position to determine the declination, which is then added to the compass reading.
However Android provides: android.hardware.GeomagneticField.getDeclination()
A Library exists for iOS: https://github.com/stephent/ObjectiveWMM
As for the API I would assume you could minimally provide declination() property and instructions to the developer to provide a real pair (lat/lon) and isDeclinationIsValid() property being true if the coordinates are supplied and valid gps coordinate pair or resulting in a valid declination.