Skip to content

Add rotation control to the precise view#7464

Open
kaustuvpokharel wants to merge 14 commits into
masterfrom
preciseView
Open

Add rotation control to the precise view#7464
kaustuvpokharel wants to merge 14 commits into
masterfrom
preciseView

Conversation

@kaustuvpokharel
Copy link
Copy Markdown
Collaborator

@kaustuvpokharel kaustuvpokharel commented May 24, 2026

The precise view dial currently always rotates with the device compass. This PR adds rotation behavior controls:
Rotate view (checkbox) -> when off, the dial is locked north-up.
Rotation source -> Compass or Movement

Compass: dial rotates with the device compass (default, previous behavior).
Movement: uses GNSS-derived heading, gated on a minimum speed (0.8 km/h) to avoid stationary noise. When the user stops moving, the dial freezes at the last valid heading instead of jittering. On devices without speed data, falls back to the direction validity flag alone.

Default is Rotate view off, no behavior change for existing users until they opt in.

Settings reorganization

Precise-view settings were previously split between a standalone precise-view menu and the navigation long-press menu. They are now consolidated into a single settings menu opened from a tune icon in the Navigation panel header.
That settings menu on Navigation header now holds: Audio proximity feedback, Rotate view, Rotation source (Compass / Movement), and the Precision picker (0.10, 0.25, 0.50, 1, 2.5, 5, 10 laid out in a 4 column grid for quicker selection)
The navigation long-press menu (on the side flag button) is simplified to just: Always Show Precise View, and Clear Destination. (These same two options are easily accessible through single tap on destination marker on pie button)

Precise view merged into the Navigation panel

The Precise view container previously sat as a separate panel below Navigation. It's now part of the Navigation container, single "Navigation" header, nav data at top, dial below it, gear icon in the header. The dial reveals and collapses with a smooth height and opacity animation.
Visibility logic is unchanged: dial appears when within precision threshold or when "Always Show Precise View" is on.

Pie menu on the destination marker

Adds direct action access on the destination flag itself, so the user doesn't need to reach the side toolbar to act on a destination they are already looking at. Tap or long-press the flag opens a pie menu with:
Clear Destination -> deletes the destination point
Always Show Precise View -> show / not show (toggle)
(same as in the long press on the naviagtion / position icon)

The destination screen position is tracked using the same imperative update*ScreenLocation() + Connections pattern as LocationMarker.qml I saw, so it stays in sync through pans, zooms, and rotations. All other behaviors mirror the location marker pie menu pattern

Demo Video

trim.5F2D69A3-892B-460C-AA7E-F1A3A90A368E.MOV

@qfield-fairy
Copy link
Copy Markdown
Collaborator

qfield-fairy commented May 24, 2026

📱 Android builds

Download an Android arm64 build of this PR for testing.
(Built from commit aad03a0)

Other Android architectures

🪟 Windows builds

Download a Windows build of this PR for testing and for arm64.

(Built from commit aad03a0)

🐧 Linux AppImage builds

Download a Linux AppImage build of this PR for testing.
(Built from commit aad03a0)

🍎 MacOS DMG universal builds

Download a MacOS DMG universal build of this PR for testing.
(Built from commit aad03a0)

@kaustuvpokharel kaustuvpokharel self-assigned this May 24, 2026
@nirvn
Copy link
Copy Markdown
Member

nirvn commented May 25, 2026

@kaustuvpokharel , can you align the UI to match what we did in the angle snapping popup here:

image

You can see yours is not quite there yet:

image

I.e., there's left margin missing, the buttons should be the exact same look (i.e. no outline, font size, padding, etc.)

Other comments:

  • GPS direction should be movement direction
  • I would not disable the rotation source label + buttons even if the rotate view checkbox is disabled, people might want to adjust that even if their rotation is off.

@nirvn
Copy link
Copy Markdown
Member

nirvn commented May 25, 2026

@kaustuvpokharel , also, I really like the use of the header to put that button, but, is it too small to be easily hit on high DPI phone screens?

Copy link
Copy Markdown
Collaborator

@mohsenD98 mohsenD98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR @kaustuvpokharel 👍, just some minor comments below.

Comment thread src/qml/PositioningSettings.qml
Comment thread src/qml/PositioningPreciseView.qml Outdated
Comment thread src/qml/PositioningPreciseView.qml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants