The $x$ and $y$ coordinates are computed from the polar coordinates (angle and distance, defined as the length of its projection on ground), measured in the field. The $z$ coordinate is computed by adding the height of branch insertion on the stem (measured in the field) to the height of the branch (calculated through its mean tilt, in case it was measured in the filed). The $x$, $y$, $z$ coordinates are corrected to take into account where the actual centre of mass lies on the branches themselves by multiplying them by branchesCM, a real number from 0.01 (CM at branch base) to 1.00 (CM at branch tip). As a rule of thumb, average live branches, with an average amount of foliage, have CM approx. $2/3$ of their length, ie. branchesCM = 0.66. $x$, $y$, $z$ moments are computed by multiplying the corresponding cartesian coordinates by branch or log mass, e.g. $m_x = F \cdot l_x$, where $F$ is branch or log mass, $l_x$ is the $x$ component of the lever arm (e.g. the $x$ component of the branch or log projection on the ground).
getCoordinatesAndMoment(azimuth, dBase, dTip, length, tipD, height, tilt, toBePruned, biomass, branchesCM)