Skip to content

Commit 5bc2e6d

Browse files
shkyyy18tabishm52claude
authored
Normalize missing FIT lap bounds and grade-adjusted speed units (#49)
* Normalize additional FIT lap bounds and grade-adjusted speeds * Sort new unit table entries, update SDK version, drop redundant tests test_table_covers_installed_profile already pins these entries against the installed profile, and existing tests cover the lap and raw conversion paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Tabish Mustufa <tabishm@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8d76d2b commit 5bc2e6d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎src/activity_parser/fit_fields.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package normalizes those to degrees, km and km/h. Vertical rates (``avg_vam``,
55
``vertical_speed``, ...) are left in m/s.
66
7-
The tables are transcribed from the FIT profile in garmin-fit-sdk 21.212.0, covering
7+
The tables are transcribed from the FIT profile in garmin-fit-sdk 21.217.0, covering
88
the ``record``, ``lap`` and ``session`` message types. ``tests/test_fit_fields.py``
99
checks that the installed profile's fields are covered.
1010
"""
@@ -34,10 +34,15 @@
3434
LAP_UNITS: dict[str, float] = {
3535
"end_position_lat": SEMICIRCLES_TO_DEGREES,
3636
"end_position_long": SEMICIRCLES_TO_DEGREES,
37+
"nec_lat": SEMICIRCLES_TO_DEGREES,
38+
"nec_long": SEMICIRCLES_TO_DEGREES,
3739
"start_position_lat": SEMICIRCLES_TO_DEGREES,
3840
"start_position_long": SEMICIRCLES_TO_DEGREES,
41+
"swc_lat": SEMICIRCLES_TO_DEGREES,
42+
"swc_long": SEMICIRCLES_TO_DEGREES,
3943
"avg_stroke_distance": M_TO_KM,
4044
"total_distance": M_TO_KM,
45+
"avg_grade_adjusted_speed": MPS_TO_KMH,
4146
"avg_speed": MPS_TO_KMH,
4247
"enhanced_avg_speed": MPS_TO_KMH,
4348
"enhanced_max_speed": MPS_TO_KMH,
@@ -56,6 +61,7 @@
5661
"avg_stroke_distance": M_TO_KM,
5762
"total_distance": M_TO_KM,
5863
"avg_ball_speed": MPS_TO_KMH,
64+
"avg_grade_adjusted_speed": MPS_TO_KMH,
5965
"avg_speed": MPS_TO_KMH,
6066
"enhanced_avg_speed": MPS_TO_KMH,
6167
"enhanced_max_speed": MPS_TO_KMH,

0 commit comments

Comments
 (0)