Add per-sample compass heading capture (DC_SAMPLE_BEARING)#563
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…menu" This reverts commit c262d81.
ericgriffin
added a commit
that referenced
this pull request
Jul 11, 2026
Weight planner (#564) landed as v104; heading stays v105. Both onUpgrade blocks and beforeOpen backstops kept in numeric order. Exact-latest version tripwire moves from the v104 test to the v105 test.
4 tasks
ericgriffin
added a commit
that referenced
this pull request
Jul 11, 2026
The dive placed in a reconstructed 3D seascape: the swim path dead-reckoned from per-sample compass heading (#563) and swim-speed estimate, anchored at the entry GPS fix and rubber-banded to the exit fix; threaded through a synthesized seafloor heightmap (the diver's deepest excursions are known points, elsewhere interpolated), viewable above and below a translucent waterline. Honest by construction: 'estimated path' and 'synthesized seafloor' captions are always shown. DeadReckoningService + TerrainBuilder + SpatialPathBuilder + SpatialGeometryService (all pure) + providers + SpatialSitePage, reachable from a terrain action on dive detail. Extends ScrubPath with a 3D (Z) cursor track and SceneBounds with a scene Z range.
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.
Foundation PR for the 3D dive flythrough (spec: docs/superpowers/specs/2026-07-11-3d-flythrough-design.md): per-sample compass heading end-to-end, from the dive computer into the database. Data-pipeline only - no UI changes and no new dependencies.
Compass heading end-to-end
dive_profiles.headingcolumn (degrees 0-359), schema v105. v104 is reserved by the in-flight weight-planner branch; the beforeOpen backstop heals any merge-order gap. Migration tests cover forward, idempotency, backstop heal, and the version-ladder tripwire.libdc_download.cnow handlesDC_SAMPLE_BEARING(previously silently discarded), with the standardUINT32_MAXsentinel.ProfileSample.heading(double?) regenerated across all platforms.ProfileSample,ProfilePointData,DiveProfilePoint(copyWith/props), all repository mapping sites, and persistence in BOTH download and reparse, so existing dives gain heading via re-parse of stored raw data.macos/Classes/DiveComputerApi.g.swiftwas a stale copy that Pigeon regen never updates (swiftOut only targets ios/Classes). It is now a symlink to the iOS copy, matching the plugin's existing C-file pattern.Why
Compass heading is the highest-fidelity input for reconstructing a dive's horizontal path between GPS entry/exit points (heading dead-reckoning with closure correction onto the anchors). It also stands alone as useful logged data. Without this PR, bearing samples reported by the computer are discarded at parse time.
Verification
flutter analyze: no issues.flutter test test/core/database/ test/features/dive_log/ test/features/dive_computer/: 2334 tests pass.Pending