feat: configurable reference frame for a north-referenced azimuth#96
Open
camilleRiquet wants to merge 69 commits into
Open
feat: configurable reference frame for a north-referenced azimuth#96camilleRiquet wants to merge 69 commits into
camilleRiquet wants to merge 69 commits into
Conversation
Bumps [simple_3d_renderer](https://github.com/MasahideMori-SimpleAppli/simple_3d_renderer) from 19.1.0 to 20.0.2. - [Changelog](https://github.com/MasahideMori-SimpleAppli/simple_3d_renderer/blob/main/CHANGELOG.md) - [Commits](https://github.com/MasahideMori-SimpleAppli/simple_3d_renderer/commits) --- updated-dependencies: - dependency-name: simple_3d_renderer dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 2.0.0 to 2.0.20. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v2.0.0...v2.0.20) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin.android dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.android.application from 8.5.1 to 8.6.0. --- updated-dependencies: - dependency-name: com.android.application dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 2.0.0 to 2.0.20. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v2.0.0...v2.0.20) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.android.tools.build:gradle from 8.5.1 to 8.6.0. --- updated-dependencies: - dependency-name: com.android.tools.build:gradle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.12.0 to 5.13.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](mockito/mockito@v5.12.0...v5.13.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [flutter_lints](https://github.com/flutter/packages/tree/main/packages) from 4.0.0 to 5.0.0. - [Release notes](https://github.com/flutter/packages/releases) - [Commits](https://github.com/flutter/packages/commits/flutter_lints-v5.0.0/packages) --- updated-dependencies: - dependency-name: flutter_lints dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [flutter_lints](https://github.com/flutter/packages/tree/main/packages) from 4.0.0 to 5.0.0. - [Release notes](https://github.com/flutter/packages/releases) - [Commits](https://github.com/flutter/packages/commits/flutter_lints-v5.0.0/packages) --- updated-dependencies: - dependency-name: flutter_lints dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.android.application from 8.6.0 to 8.6.1. --- updated-dependencies: - dependency-name: com.android.application dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.android.tools.build:gradle from 8.6.0 to 8.6.1. --- updated-dependencies: - dependency-name: com.android.tools.build:gradle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.13.0 to 5.14.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](mockito/mockito@v5.13.0...v5.14.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.android.application from 8.6.1 to 8.7.2. --- updated-dependencies: - dependency-name: com.android.application dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.14.1 to 5.14.2. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](mockito/mockito@v5.14.1...v5.14.2) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.android.tools.build:gradle from 8.6.1 to 8.7.2. --- updated-dependencies: - dependency-name: com.android.tools.build:gradle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [simple_3d_renderer](https://github.com/MasahideMori-SimpleAppli/simple_3d_renderer) from 20.0.2 to 21.0.0. - [Changelog](https://github.com/MasahideMori-SimpleAppli/simple_3d_renderer/blob/main/CHANGELOG.md) - [Commits](https://github.com/MasahideMori-SimpleAppli/simple_3d_renderer/commits) --- updated-dependencies: - dependency-name: simple_3d_renderer dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 2.0.20 to 2.1.0. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v2.1.0/ChangeLog.md) - [Commits](JetBrains/kotlin@v2.0.20...v2.1.0) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 2.0.20 to 2.1.0. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v2.1.0/ChangeLog.md) - [Commits](JetBrains/kotlin@v2.0.20...v2.1.0) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin.android dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 2.1.0 to 2.1.10. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v2.1.0...v2.1.10) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin.android dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 2.1.0 to 2.1.10. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v2.1.0...v2.1.10) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.14.2 to 5.15.2. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](mockito/mockito@v5.14.2...v5.15.2) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [simple_3d_renderer](https://github.com/MasahideMori-SimpleAppli/simple_3d_renderer) from 21.0.0 to 22.0.0. - [Changelog](https://github.com/MasahideMori-SimpleAppli/simple_3d_renderer/blob/main/CHANGELOG.md) - [Commits](https://github.com/MasahideMori-SimpleAppli/simple_3d_renderer/commits) --- updated-dependencies: - dependency-name: simple_3d_renderer dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.android.application from 8.7.2 to 8.8.2. --- updated-dependencies: - dependency-name: com.android.application dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [flutter_lints](https://github.com/flutter/packages/tree/main/packages) from 5.0.0 to 6.0.0. - [Release notes](https://github.com/flutter/packages/releases) - [Commits](https://github.com/flutter/packages/commits/flutter_lints-v6.0.0/packages) --- updated-dependencies: - dependency-name: flutter_lints dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [flutter_lints](https://github.com/flutter/packages/tree/main/packages) from 5.0.0 to 6.0.0. - [Release notes](https://github.com/flutter/packages/releases) - [Commits](https://github.com/flutter/packages/commits/flutter_lints-v6.0.0/packages) --- updated-dependencies: - dependency-name: flutter_lints dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 2.1.20 to 2.2.0. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v2.1.20...v2.2.0) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin dependency-version: 2.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 2.1.20 to 2.2.0. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v2.1.20...v2.2.0) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin.android dependency-version: 2.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> # Conflicts: # example/android/settings.gradle
Bumps com.android.tools.build:gradle from 8.9.2 to 8.11.0. --- updated-dependencies: - dependency-name: com.android.tools.build:gradle dependency-version: 8.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.android.application from 8.9.2 to 8.11.0. --- updated-dependencies: - dependency-name: com.android.application dependency-version: 8.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> # Conflicts: # example/android/settings.gradle
Dependabot couldn't find the original pull request head commit, 3e14905.
….2.20 in /android Dependabot couldn't find the original pull request head commit, da439a9.
…mple/android Dependabot couldn't find the original pull request head commit, 92c135d.
…android Dependabot couldn't find the original pull request head commit, 2b82b36.
…/android Dependabot couldn't find the original pull request head commit, d3cac45.
Dependabot couldn't find the original pull request head commit, 85c5b23.
Displays whether the current platform (e.g., Android/iOS) supports rotation sensing.
fcf46cb to
96f7d42
Compare
Owner
|
Thanks for the PR @camilleRiquet ! 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #95
Motivation
The azimuth is inconsistent across platforms:
Details and a reproduction are in #95.
What this PR does
Adds an opt-in RotationSensor.referenceFrame:
enum ReferenceFrame { device, magneticNorth, trueNorth }
RotationSensor.referenceFrame = ReferenceFrame.magneticNorth;
iOS
Maps the value to the matching CMAttitudeReferenceFrame. CoreMotion expresses a north frame as (north, west, up), whereas this package's documented world is (east, north, up). For north frames the attitude quaternion is rotated
90° about the vertical axis so the emitted orientation matches the package convention and the azimuth stays 0 == north, consistent with Android. The frame is re-applied (sensor restarted) when the value changes mid-stream.
Android
TYPE_ROTATION_VECTOR is already magnetic-north / east-north-up, so all values keep using it. True north would need the local geomagnetic declination (requires a location fix); until then trueNorth behaves like magneticNorth on
Android (documented in the enum).
Notes
Testing
Verified on a physical iOS device with magneticNorth: pointing north reads ~0°, east ~90°; the heading is stable under pitch/roll and only changes when rotating about the vertical axis; consistent across cold launches. Android
behavior unchanged.
Disclaimer
Sorry about the previous pull request; I meant to submit a pull request on my fork but made a mistake.
As mentioned in issue #95, I made this change to fix the issue that was discovered, but it might just be that I made a mistake in the initial configuration.