# principal_axes_inertia¶

Transform the inertia tensor $$\boldsymbol{j}_a$$ defined about the A frame of reference to the centre of gravity and aligned with the principal axes of inertia.

The inertia tensor about the centre of gravity is obtained using the parallel axes theorem

$\boldsymbol{j}_{cm} = \boldsymbol{j}_a + \tilde{r}_{cg}\tilde{r}_{cg}m$

and rotated such that it is aligned with its eigenvectors and thus represents the inertia tensor about the principal axes of inertia

$\boldsymbol{j}_p = T_{pa}^\top \boldsymbol{j}_{cm} T^{pa}$

where $$T^{pa}$$ is the transformation matrix from the A frame to the principal axes P frame.

param j_a

Inertia tensor defined about the A frame.

type j_a

np.array

param r_cg

Centre of gravity position defined in A coordinates.

type r_cg

np.array

param m

Mass.

type m

float

returns

Containing $$\boldsymbol{j}_p$$ and $$T^{pa}$$

rtype

tuple