Skip to content

Heading for setRotation('right') not correct #3

@nkulic

Description

@nkulic

When rotating device to landscape (right) side it seems that heading value is not correct. It appears that it jumps by ~20 degrees when in landscape right position, while landscape left position is correct.

@dpyeates Can you check if you have same results on your side?

I have tried Attitude.reset() on rotation change but it didn't changed my results.


  const handleOrientation = (orientation: string) => {
    if (orientation === 'LANDSCAPE-LEFT') {
      Attitude.setRotation('left');
      Attitude.reset();
    } else if (orientation === 'LANDSCAPE-RIGHT') {
      Attitude.setRotation('right');
      Attitude.reset();
    } else {
      Attitude.setRotation('none');
      Attitude.reset();
    }
  };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions