height: Height of Tree or any vertical Object

View source: R/dendrometry.R

heightR Documentation

Height of Tree or any vertical Object

Description

Computes the height of tree, pillar, girder, mast or any vertical object. It allows either slope (in percent) or angle (in degrees or radians). No matter the relative position of the persons who measures the angle or the slope.

Usage

height(
  distance,
  top,
  bottom,
  type = c("angle", "slope"),
  angleUnit = c("deg", "rad")
)

Arguments

distance

numeric, vector of the horizontal distance between object and the person who measures angle.

top, bottom

numeric vector of top angle and bottom angle respectively (readings from a clinometer).

type

the type of top and bottom measures. Either "angle" or "slope". Default is "slope".

angleUnit

the unit of top and bottom measures when type = "angle". Either "deg" for degree or "rad" for radian. Default is "deg".

Value

A vector of heights.

Examples

height(10, 80, 17)
height(17, top = -18, bottom = -113)
height(distance = 18, top = 42, bottom = -12, type = "angle", angleUnit = "deg")
height(
  distance = 18:21, top = 42:45, bottom = -12:-15, type = "angle",
  angleUnit = "deg"
)
## Below shows warning messages
height(
  distance = 18:21, top = -42:-45, bottom = -12:-15, type = "angle",
  angleUnit = "deg"
)

dendrometry documentation built on June 8, 2025, 10:38 a.m.