
Last chance! 50% off unlimited learning
Sale ends in
(Cumulative) Elevation gain.
get_elevation_gain(object, smooth = FALSE, cumulative = FALSE,
vertical_noise = 0)
A (univariate) zoo object.
Logical. Should the elevation be smoothed? Default is
TRUE
.
Logical. Return the cumulative elevation gain
(FALSE
; default) or just the elevation gain?
A scalar. Absolute elevation gains less that
vertical_noise
are set to zero. Default is 0
.
The elevation gain is defined here as the difference in altitude
between two consecutive observations. If cumulative = FALSE
then the elevation gain is returned, otherwise any elevation loses
(i.e. negative elevation gain) are ignored and the cumulative
elevation gain is returned. If smooth = TRUE
then the
elevation gain will be smoothed using a spline smoother before
either returning it or computing cumulative elevation gains.