From 1e542d655d333b8e51e9ddc62ad124d8e7b99f5b Mon Sep 17 00:00:00 2001 From: minees <89367698+minees@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:50:31 +0900 Subject: [PATCH] Update calculate_velocity.R --- R/calculate_velocity.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/calculate_velocity.R b/R/calculate_velocity.R index e799e2b..cc8ff30 100644 --- a/R/calculate_velocity.R +++ b/R/calculate_velocity.R @@ -38,8 +38,8 @@ calculate_velocity <- function(data, window_length = 20) { # Calculate how many samples are to be analyzed using the window length in ms ---- # Make sure we have 100 rows which we can analyze, if not analyze all available rows - maxRow <- 100 - if (nrow(data) < 100) maxRow <- nrow(data) + maxRow <- 10000 + if (nrow(data) < 10000) maxRow <- nrow(data) # Go through the first 100 samples (or less) to find the average time between samples sampleTime <- 0