get_stem_tilt: Get tree tilt from QSM

View source: R/traits_from_qsm.R

get_stem_tiltR Documentation

Get tree tilt from QSM

Description

This function calculates tilt of a tree from a QSM. The function identifies the upper and lower extreme segments of the QMS (trunk sections only) and computes a vector between them, and returns the devation of that angle from directly vertical.

Usage

get_stem_tilt(qsm, terminus_diam_cm = 4)

Arguments

qsm

a QSM loaded using '[load_qsm()]'.

terminus_diam_cm

numeric - trunk diameter at which it is treated as a branch.

Value

A single numeric value giving stem tilt in degrees from vertical.

Examples

qsm_file = system.file("extdata", "tree_0744_qsm.txt", package='tReeTraits')
qsm = load_qsm(qsm_file)
get_stem_tilt(qsm)

tReeTraits documentation built on Feb. 26, 2026, 1:07 a.m.