Calculates HRV metrics from a FIT file, integrating data extraction, RR interval processing, and HRV calculation with error handling.
process_fit_file(
file_path,
standing_time = 180,
transition_time = 20,
laying_time = 180,
min_rr = 272,
max_rr = 2000,
window_size = 7,
threshold = 0.2,
centered_transition = TRUE,
centered_window = FALSE,
warmup = 70,
sport_name = "OST",
min_quality_threshold = 0,
correction_method = "linear"
)Path to FIT file
Time in seconds to consider as standing
Time in seconds to consider as transition
Time in seconds to consider as laying
Minimum RR interval in milliseconds
Maximum RR interval in milliseconds
Window size for moving average calculation
Threshold for artifact detection
Logical indicating whether the transition time should be split into laying and standing times. FALSE, if transition time is only taken from the laying phase.
Logical indicating whether the moving window should be centered. Defaults to FALSE.
Time in seconds from the start that should be discarded
Name of the sport for the fit file. Used as a filter.
Minimum quality threshold (0-1) for data to be processed. Data below this quality threshold will be discarded. Default is 0.0 (no filtering).
Character string specifying the artifact correction method. Options are: "linear", "cubic", "lipponen", "none". Default is "linear".
Tibble containing HRV metrics