I am trying to understand how to transform vectors between cartesian coordinate systems that are rotated wrt each others. As a step in this process I have come up with a toy problem:
Consider a ground station, G. Let us introduce a right handed coordinate system with origin in G, x-axis pointing north and y-axis pointing east.
A plane, B, is located at: $$ \vec{GB}_G=[2000,4000,-1000] $$
Its orientation is: yaw = 90 degrees, pitch = roll = 0.
It reports seing another plane, O, at position: $$ \vec{BO}_B=[3000,-3000,0] $$ but this is relative to its own origin, B, and using it owns basis vectors $\{\hat{x_B},\hat{y_B},\hat{z_B}\}$.
What is the position of the other plane in the G coordinate system, $\vec{GO}_G$? That is using G as origin and using the G basis vectors $\{\hat{x_G},\hat{y_G},\hat{z_G}\}$.
The curvature of the earth can be ignored since the distances are small.
Also in the more general case pitch and roll are different from 0. How is the problem then solved?
The yaw, pitch and roll describes how to rotate the basis of the G coordinate system: $\{\hat{x_G},\hat{y_G},\hat{z_G}\}$ to get the basis of the B coordinate system: $\{\hat{x_B},\hat{y_B},\hat{z_B}\}$: