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 countshang_timeinside 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 tobottom_timeand reports the raw excess asphase_overlap_sfor 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_sis null for the first dive — Garmin reports the gap since the previous session there, not an in-session rest.hr_recovery_60sis null when the next dive starts inside the 60 s window; a truncated window would read as poor recovery.eq_stop_countis 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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dive_fit_parse-1.1.tar.gz | 8.4 kB | Without provenance | Details for dive_fit_parse-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dive_fit_parse-1.1-py3-none-any.whl | Python 3 | none | any | Details for dive_fit_parse-1.1-py3-none-any.whl |
Total release size: 15.9 kB
Release files / dive_fit_parse-1.1.tar.gz
| Download URL | dive_fit_parse-1.1.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0489a8603611e69c066aed468ae6103b0f68574ab25f417476603637df6341e
|
|
BLAKE2b-256 checksum How to use checksums |
f85c9333036cdd5d7380627747c491b4aba4c365cb503cbecd94ef171083c72e
|
| 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.1-py3-none-any.whl
| Download URL | dive_fit_parse-1.1-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f093ccdde22f10e9147a5bb073a93e8389dd8d1630dea437883c82265b1b3fe
|
|
BLAKE2b-256 checksum How to use checksums |
2b97711f93ba9977ac6a99efd5a8683927ec32ffccc79261263fcc54f45941b2
|
| 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.1
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.