import: read a Suunto Nautic/Ocean .bin in the file-import wizard - #4
Merged
Merged
Conversation
urbamax
force-pushed
the
feat/import-dive-computer-raw
branch
2 times, most recently
from
September 8, 2026 13:06
c7bd7c7 to
4d0683c
Compare
…t wizard A Bluetooth download from a Nautic-generation watch (Nautic, Ocean) stores its raw log as concatenated SBEM0103 records. This teaches the universal "Import data" wizard to recognise such a file and read it with no separate menu, redirect or extra click: FormatDetector spots the SBEM0103 magic and returns ImportFormat.suuntoNauticRaw, and RawDiveComputerParser runs the same native libdivecomputer parse a live download runs, then flattens each dive into the maps UddfEntityImporter already persists -- so profile, tanks, gas mixes, deco model and GPS all import with no Nautic-specific code downstream. - RawLogFileReader splits a file into its SBEM0103 records. - RawLogImportService greedily groups the [profile][/Summary] record pair per dive, parses it natively, and gates the result on RawProfileSanityCheck before mapping to DownloadedDive. - The watch's own event wording is carried as a labelled bookmark; deco stop / safety stop / ceiling also get their typed marker. The driver's t=0 initial-gas SAMPLE_EVENT_GASCHANGE is dropped -- real switches come through gasSwitches. - The computer registers as "Suunto / Nautic" with no serial: the .bin has no /Info record, and a truncated or guessed serial is worse than none (the Bluetooth path still gets the real serial from the BLE name). Native golden coverage (test_parse_suunto_nautic) parses a committed real dive fixture end to end; Dart tests cover the reader, the service, the parser and the format detector. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
urbamax
force-pushed
the
feat/import-dive-computer-raw
branch
from
September 8, 2026 17:36
7dde73f to
64bded8
Compare
urbamax
added a commit
that referenced
this pull request
Sep 8, 2026
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.
What
Import a raw Suunto Nautic-generation (
Nautic,Ocean) dive-log file through the existing Import data wizard — same single entry point as every other file format, with automatic format detection and no separate menu, redirect or extra step.A Bluetooth download from these watches stores its log as concatenated
SBEM0103records ([profile][/Summary]per dive). This PR:FormatDetectorrecognises theSBEM0103magic →ImportFormat.suuntoNauticRaw(SourceApp.suunto, confidence 1.0).RawLogFileReadersplits the file into itsSBEM0103records.RawLogImportServicegreedily groups the profile +/Summaryrecord pair per dive, parses it with the same native libdivecomputer call a live BLE download uses, and gates each result onRawProfileSanityCheckbefore mapping toDownloadedDive.RawDiveComputerParserflattens each dive into the mapsUddfEntityImporteralready persists → profile, tanks, gas mixes, deco model (GF), pO2 and GPS all import with no Nautic-specific code downstream.Notes
t=0initial-gasSAMPLE_EVENT_GASCHANGEis dropped (real switches come throughgasSwitches).Suunto / Nautic, no serial: the.binhas no/Inforecord, so there is no watch serial or firmware in the file. A truncated/guessed serial is worse than none. Device identity for a file import can be filled from the Suunto cloud import instead; a BLE download still gets the real serial from the advertised name.Tests
test_parse_suunto_nautic): parses a committed real dive fixture (suunto_nautic_dive.bin) end to end — depth, duration, dive mode, deco model, GF, gas mix, tank pressures.RawLogFileReader,RawLogImportService(grouping, multi-dive, unrecognised input),RawDiveComputerParser(payload shape, droppedt=0gaschange, error paths),FormatDetector(SBEM0103 ->suuntoNauticRaw), enum wiring.🤖 Generated with Claude Code