cordova-plugin-device-orientation icon indicating copy to clipboard operation
cordova-plugin-device-orientation copied to clipboard

compass heading is off by 40 degrees

Open caleb87 opened this issue 5 months ago • 0 comments

Problem

On a Samsung Galaxy S23 Ultra, the compass is about 40 degrees off. The compass shows 320 degrees when pointing north. It's off 40 degrees while pointing any directions. The Google Maps app shows the compass pointing in the correct direction, so I assume the phone operating system has the accurate compass?

What is expected to happen?

Compass heading is accurate.

What does actually happen?

Compass heading is not accurate.

Information

Command or Code

navigator.compass.watchHeading(function(a) {
  // returns {magneticHeading: 323.75201416015625, trueHeading: 323.75201416015625, headingAccuracy: 0, timestamp: 1725987545312} while pointing north (0/360)
}

Environment, Platform, Device

Version information

Cordova CLI 12.0.0 Android 13.0 Plugin 3.0.0

Checklist

  • [x] I searched for existing GitHub issues
  • [x] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

caleb87 avatar Sep 10 '24 17:09 caleb87