Skip to main content

dive-fit-parse

Deterministic Garmin freediving .FIT parser. One record per dive: depth, phase durations, heart rate and equalization indicators.

Install

pip install dive-fit-parse

Use

python -m dive_fit_parse <FIT path...>
python -m dive_fit_parse <FIT path...> --json

No correction operations. The swim parser's --drop-lengths / --merge have no counterpart here: segmentation follows lap boundaries rather than a threshold, so the ghost-length failure mode does not arise. Across two sessions (37 dives) there were zero cases needing correction.

Indicators, not signals

This parser emits no anomaly signals — there is no dive equivalent of the swim parser's F1–F6. Everything below is an indicator; deciding whether one is normal belongs to P1, and confirmation to the user.

The reason is empirical. Equalization stops fired in 6 of 8 training dives on 2026-08-19 — all six FIM, zero on both CNF — so they track discipline, not anomaly. A detector firing in three quarters of cases carries maintenance cost and no information.

Three things that look like anomalies but are not:

  • Equalization stops — a discipline characteristic. Read alongside discipline, depth and the diver's own account.
  • hr_min_dive — no absolute threshold. Meaningful only as a relative position, and relative quantities are a runtime concern.
  • descent_time + hang_time + ascent_time > bottom_time — Garmin counts hang_time inside the descent and ascent intervals. This occurs in every lap measured (37/37 across two sessions), so it is an accounting artifact, not a physical pause. The parser normalizes the phases to sum to bottom_time and reports the raw excess as phase_overlap_s for audit.

Segmentation

The lap window scopes the search; the dive is the longest contiguous submerged run within it. Deterministic, with no tuned threshold on the segmentation itself. Threshold-based segmentation was rejected — depth > 1.0 silently dropped a whole dive (lap17 of 2026-08-19, max 1.725 m).

Null convention

None means unmeasured and is never coerced to zero:

  • surface_interval_s is null for the first dive — Garmin reports the gap since the previous session there, not an in-session rest.
  • hr_recovery_60s is null when the next dive starts inside the 60 s window; a truncated window would read as poor recovery.
  • eq_stop_count is null when there is no usable descent phase. No descent is not zero stops.

Equalization threshold

vertical speed < 0.10 m/s, depth > 3 m, sustained >= 2 s.

Descent speed is bimodal across both sessions (median 0.504 m/s in each), with a stationary mode centred on zero and a trough at 0.20–0.30. The 0.10 cutoff sits well inside that trough, so only the stationary mode is captured.

Stop counts are threshold-sensitive — one dive ranges from 4 to 7 stops across plausible cutoffs — while the FIM/CNF contrast is stable at every cutoff. Treat counts as within-session comparisons, not absolute quantities.

MIT. Author ssim-baa.

Metadata

Release files for dive-fit-parse 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dive-fit-parse 1.0
File Size Uploaded Provenance Actions
dive_fit_parse-1.0.tar.gz 7.7 kB Without provenance Details for dive_fit_parse-1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dive-fit-parse 1.0
File Interpreter ABI Platform Actions
dive_fit_parse-1.0-py3-none-any.whl Python 3 none any Details for dive_fit_parse-1.0-py3-none-any.whl

Total release size: 14.9 kB

Release files / dive_fit_parse-1.0.tar.gz

Download URL dive_fit_parse-1.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1c7829867d516a9b2c9e8c7c6234a8720a5654a329dad6388557dd538001bdd9
BLAKE2b-256 checksum
How to use checksums
ea28644d9e849f865bc1d23ec88306ea4548d98d42820d8327d2dc3f8d2e3a1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / dive_fit_parse-1.0-py3-none-any.whl

Download URL dive_fit_parse-1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98c0d52caadd03e846a0822d14c5287dc2c57e8eb89b7c08ad6af2c7ed42fd4d
BLAKE2b-256 checksum
How to use checksums
332c5fe30b53c6ad17f11ba0825a5d1480a85c0b32c45ade681fa854d4fcb8a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Security for dive-fit-parse 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page