I have two sets of coordinates in cartesian format which is like x,y,z from the center of the earth. the The first point is a base station which never moves, and the second is a rover which moves.
I want to get coordinates of the rover on a relative plane from the base station which I achieved doing the following:
passing the base station point to this function
public static List<Double> getTransformAngles(Point3d pointA) {
double rotationZ = Math.atan2(pointA.getY(), pointA.getX());
double pow = Math.pow(pointA.getX(), 2) + Math.pow(pointA.getY(), 2);
double rotationY = Math.atan2(Math.sqrt(pow), pointA.getZ());
return List.of(-rotationZ, -rotationY);
}```
then I rotate the rover point by the rotations and do the same with the base station then subtract the two.
this WORKS but the I want the X axis to be N and S. any idea what to rotate it by to make it do that?