amt icon indicating copy to clipboard operation
amt copied to clipboard

speed is not returning the results in m/s

Open LuisLauM opened this issue 2 years ago • 0 comments

speed function is not giving the outputs in m/s (as its documentation indicates). That is maybe because internally the funtion is calculating the steps without considering the lonlat = TRUE argument. I have tried changing the CRS value, but it is the same.

speed.track_xyt <- function(x, append_na = TRUE, ...) {
  stps <- suppressWarnings(steps(x))
  s <- stps$sl_ / as.numeric(stps$dt_, units = "secs")
  if (append_na) {
    c(s, NA)
  } else {
    s
  }
}

LuisLauM avatar Mar 01 '22 12:03 LuisLauM