knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Hiking functions all take slope as input and output some ratio of distance (d) to cost, like speed (d/time) or efficiency (d/energy). While there's plenty out there to choose from, hiker currently implements just two:
Defined by Tobler (1993) as a simple exponential function:
$$v = 1.6 * exp(-3.5x + 0.5) * w$$
where $x$ is the slope in rise-over-run and $w$ is a weight equal to 1 for on-path and 0.6 for off-path hiking. By default, THF returns velocity in km/hr, but the internal tobler
function converts this to m/s.
Additional parameters:
off.path
a logical, if TRUE (default), then w = 0.6
, otherwise w = 1
.Defined by Campbell (2019) as a modified Lorentz distribution:
$$v = c \left[\frac{1}{\pi b \left(1 + \frac{\theta - a}{b}\right)^{2}}\right] + d + e\theta$$
where $\theta$ is the slope in degrees (note the difference with THF) and the parameters $a$, $b$, $c$, $d$, and $e$ are defined relative to the deciles of sampled hikers in Campbell's study. CHF returns velocity in m/s. The decile specifies how fast or slow the hiker is assumed to be. Note that for compatibility with the gdistance
calculation of slope, the internal campbell
function assumes values are in rise-over-run, then converts them to degrees for the calculation of velocity.
Additional parameters:
decile
an integer, one of 10L
, 20L
, ..., 90L
(default is 50L
).Campbell, Michael J., Philip E. Dennison, Bret W. Butler, and Wesley G. Page (2019). "Using crowdsourced fitness tracker data to model the relationship between slope and travel rates. Applied Geography 106, 93-107. [https://doi.org/10.1016/j.apgeog.2019.03.008]
Tobler, Waldo R. (1993). "Three Presentations on Geographical Analysis and Modeling: Non-Isotropic Geographic Modeling, Speculations on the Geometry of Geography, and Global Spatial Analysis." National Center for Geographic Information and Analysis, Technical Report 93-1.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.