I realize GPS Coordinates are spherical coordinates. However I know the earth is more of an ellipsoid. I need to compute with a fairly high degree of accuracy the pitch and yaw between two objects whose coordinates are expressed in Longitude,Latitude and Altitude.
By "pitch" I mean relative to true north, how many degrees does something at point A have to turn to face point B By "yaw" I mean relative to the ground how many degrees do I have to tilt to face the object in question. Facing the ground could be 0 degrees, the horizon 90 degrees and the sky 180 degrees for example.
There are a few answers that start to approach this but nothing I can tell quite answers it. To determine pitch/yaw you have to realize its relative to something sitting on the outside of the ellipsoid at one of the two points. Simply using |A||B|cos(theta)=A dot b doesn't work because that gives the angle between them from the perspective of the center of the earth. Also that assumes you converted gps coordinates to XYZ first. (Which is done easily enough)