Revision 9e5b9bb8a0564f8bf629df4ca5e96d3078f50363 authored by jmc on 14 July 2008, 00:00:00 UTC, committed by Gabor Csardi on 14 July 2008, 00:00:00 UTC
1 parent a3b36b1
Raw File
speedGPS.R
speedGPS <- function(xyz, time, rOut = c(.25, .75), naValue = .25) {
    speed <-  trackSpeed(xyz, time)
    rIn <- range(speed, na.rm = TRUE)
    value <- diff(rOut) * (speed - rIn[1])/diff(rIn) + rOut[1]
    ifelse(is.na(value), rep(naValue, length(value)), value)
}
back to top