Got a problem here I was hoping you could help me with.
I have a point P in a spherical coordinate system, and I'll let the origin be called the point Q to simplify my explanation. The distance from Q to P is fixed, H. but P can rotate around Q, so that are variable.
Now, take P to be the origin of a second spherical coordinate system, from which distance measurements are made to arbitrary points . What I want to do is to convert the arbitrary distance measurements from point P into cartesian coordinates relative to the "Q" coordinate system - baring in mind that P may change position relative to Q.
I can convert from spherical to cartesian coordinates around the P origin using the formulas:
And I can get the cartesian coordinates for P within the Q coordinate system, using the same formulas. The problem is that the orientation of the P coordinate system changes depending on the location of P (The angles , and ). If the vector QP points in the positive z direction of the Q coordinate system (P lies on the z-axis), then take the x-axis (Or datum point) of the P coordinate system to be parallel with the x-axis of the Q coordinate system, and pointing in the positive direction.
The unit vector i=[1,0,0] in the P system (Pointing along positive x-axis), will remain perpendicular to vector QP (With Q, P, and lying in the same plane), as the point P is free to orbit around Q. This is what I can't get my head around, but my maths is rusty to say the least, and I have an inkling I will need a vector calculation of some sort, like dot product/cross product, but can't think how to go about it.
I hope I made my explanation clear enough for you to visualise the situation - had a hard time trying to describe it.