Skip to content

compass heading is off by 40 degrees #85

@caleb87

Description

@caleb87

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions