SH</code> denote
cosine and sine of heading (after adjusting for declination), with similar
terms for pitch and roll using second letters <code>P</code> and <code>R</code>, the
rotation matrix is</p>
<div class="sourceCode"><pre><code><span> <span class="fu"><a href="https://rdrr.io/r/base/cbind.html" class="external-link">rbind</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span> <span class="va">CH</span><sp