commit aa5050425a00c29eec459ef9c02070d8ce8902bf
parent db41af68eb462e8550fbab145dfb17ec758d5f79
Author: Jean Schurger <jean@schurger.org>
Date: Fri, 13 Nov 2026 15:29:36 -0500
Validation report against the Shearwater (docs/VALIDATION.md, in English, for the 40 m entitlement request); stop statistics in the test
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K7deYGcjJYQu2t1EUEKgbs
Diffstat:
| A | docs/VALIDATION.md | | | 114 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 114 insertions(+), 0 deletions(-)
diff --git a/docs/VALIDATION.md b/docs/VALIDATION.md
@@ -0,0 +1,114 @@
+# Open Rémora — decompression engine validation against a certified dive computer
+
+Status: 13 November 2026, engine commit `39c63b0`. Written to support the request for the
+full *Submerged Depth and Pressure* entitlement (40 m). The French design notes are in `CONCEPTION.md`.
+
+## Summary
+
+Open Rémora is a **backup** dive computer for Apple Watch Ultra. Its decompression engine
+(Swift package `RemoraDeco`) implements Bühlmann ZHL-16C with gradient factors, the same
+algorithm family as Shearwater dive computers. We replayed ten real dives logged by a
+**Shearwater Petrel 3** through the engine, with the same gradient factors, gas and surface
+pressure, and compared what the engine would have displayed to what the Petrel displayed,
+sample by sample (one sample every 10 s, 2,545 samples).
+
+- **Decompression stops** (3 dives, 239 samples in deco): same stop depth on 226 samples (95 %);
+ stop duration within 1 minute on every sample, 0.1 min shorter on average.
+- **No-decompression limit** (616 samples where the Petrel shows 30 min or less): 0.26 min
+ shorter than the Petrel on average, within 2 minutes on 88 % of samples.
+- **Entering decompression**: 0.3 to 0.8 min *before* the Petrel on all three dives.
+- **Tissue loading**: the Petrel logs its 16 tissue pressures about every 5 minutes; replaying
+ the depth profile reproduces them with an RMS error of 0.004 to 0.008 bar (102 snapshots).
+
+The engine is tuned to stay on the conservative side of the Petrel on average. Known
+deviations are listed at the end.
+
+## Data set
+
+Dives by the author, downloaded from the Petrel 3 to Shearwater Cloud and exported
+(`dive_data.db`, Petrel Native Format). Air unless noted; open circuit.
+
+| Dive | Date | Site | Max depth | Duration | Gas | GF | Mandatory stops (Petrel) |
+|---|---|---|---|---|---|---|---|
+| 188 | 2024-06-29 | Lion de mer | 20.4 m | 44 min | Air | 45/95 | none |
+| 189 | 2024-06-29 | Lion de mer | 27.0 m | 51 min | Air | 45/95 | none (repetitive, 4 h surface interval) |
+| 190 | 2024-07-04 | Fer à cheval | 40.2 m | 36 min | Air | 45/95 | 3 m |
+| 191 | 2024-07-13 | Pyramides | 34.2 m | 57 min | Air | 85/90 | none |
+| 192 | 2024-07-17 | Le Rubis | 38.4 m | 33 min | Air | 85/90 | 6 m, 3 m |
+| 193 | 2024-07-24 | Le Rubis | 40.1 m | 34 min | EAN30 | 85/90 | 3 m |
+| 194 | 2024-08-05 | Lion de mer | 20.3 m | 41 min | Air | 85/90 | none |
+| 195 | 2025-07-19 | Kanawake | 15.9 m | 36 min | Air | 85/90 | none |
+| 196 | 2025-09-06 | Kanawake | 11.0 m | 40 min | Air | 85/90 | none |
+| 197 | 2025-09-06 | Kanawake | 22.2 m | 41 min | Air | 85/90 | none (repetitive, 1 h 45 surface interval) |
+
+Depth range 11 to 40 m, coldest water 8 to 23 °C depending on the dive, two repetitive dives.
+
+## Method
+
+1. `tools/shearwater_decode.py` decodes the export: for each 10-second sample, depth, gas,
+ no-decompression limit, next stop depth and time, time to surface; and the dive settings
+ (gradient factors, surface pressure). Field layout after libdivecomputer's Shearwater parser.
+2. The test `ShearwaterComparisonTests` feeds each depth sample to `DiveComputer`, exactly as
+ the watch app does with the depth sensor, with the Petrel's gradient factors, gas and
+ surface pressure. Repetitive dives start from the tissue state left by the previous dive.
+3. At every sample the engine output is compared with the Petrel's display.
+4. `tools/shearwater_fit.py` separately checks tissue loading against the tissue pressures the
+ Petrel itself logged during the dive.
+
+The dive logs are personal data and are kept out of the repository; the decoder and the test
+are in it, so the comparison can be repeated on any Shearwater export.
+
+## Results
+
+### Decompression stops
+
+| Dive | Enters deco (Petrel / Open Rémora) | Leaves deco | Samples in deco | Same stop depth | Stop time, mean difference |
+|---|---|---|---|---|---|
+| 190 Fer à cheval, GF 45/95 | 15.2 / 14.8 min | 29.3 / 29.0 min | 84 | 84 | −0.06 min |
+| 192 Le Rubis, GF 85/90 | 12.3 / 12.0 min | 30.0 / 29.5 min | 104 | 91 | −0.12 min |
+| 193 Le Rubis EAN30, GF 85/90 | 16.3 / 15.5 min | 25.2 / 25.0 min | 51 | 51 | −0.14 min |
+
+Stop time never differs by more than 1 minute. On dive 192 the 13 samples with a different
+stop depth are the transition from the 6 m stop to the 3 m stop, which Open Rémora clears a
+few tens of seconds before the Petrel. On dive 191 Open Rémora asks for a stop during one
+sample (10 s); the Petrel never does.
+
+### No-decompression limit
+
+| Samples | Mean difference | Mean absolute difference | Within 2 min |
+|---|---|---|---|
+| All, Petrel shows less than 99 min, deeper than 9 m (1,100) | +0.62 min | 2.13 min | — |
+| Petrel shows 30 min or less (616) | −0.26 min | 1.32 min | 88 % |
+
+A negative difference means Open Rémora shows less time than the Petrel.
+
+### What was tuned on this data
+
+- No-stop criterion: a direct ascent must reach the surface within the high gradient factor;
+ the low gradient factor only places the stops. Off-gassing during the ascent is credited
+ partially (ascent assumed at 30 m/min). With no credit the limit was 1.8 min shorter than
+ the Petrel and dropped to zero too early on multi-level dives; with full credit it was
+ 2 min longer than the Petrel, which we rejected.
+- Stops: the next stop must be tolerated before leaving the current one (no credit for the
+ ascent between stops). This moved the mean stop-time difference from −0.3/−0.6 min to −0.1 min.
+
+## Known deviations and limits
+
+- **Late, shallow part of long dives**: on 13 of the 616 samples Open Rémora shows 5 minutes
+ or more above the Petrel. There the limit is driven by slow tissues and a very small
+ difference in tissue pressure moves it by many minutes. Largest difference: 28 min at 12 m.
+- **Time to surface**: the Petrel shows 3 to 5 minutes more than Open Rémora, which does not
+ include the safety stop in that figure. Not yet confirmed as the only cause.
+- **Leaving deco**: 15 to 30 seconds before the Petrel on the three dives.
+- **Scope**: one diver, one computer, ten dives, air and one nitrox dive, no dive deeper than
+ 40 m, no dive at altitude. Helium is not supported by the engine.
+- The comparison validates the algorithm on recorded profiles. It does not validate the
+ watch's depth sensor, which has not yet been used in water with this app.
+
+## Other safeguards in the app
+
+- 40 unit tests on the engine (tissue equations, limits, stops, altitude, repetitive dives, logbook).
+- Default gradient factors 30/70, more conservative than the Petrel settings used above.
+- The app states on its home screen, and on its support page, that it is not a certified
+ dive computer and must be worn with a primary dive computer:
+ https://agora.schurger.org/open-remora/