Search code examples
mathgpscomputational-geometry

Convert earth-centric coordinate frame to coordinate frame aligned to tangential plane?


Given that earth is perfectly spherical with radius R. The earth-centric coordinate system E is defined as follows:

  • The center of this sphere is the origin,
  • Earth's north pole represents the z-axis.
  • Latitude 0 and longitude 0 represent x-axis.
  • Latitude 0 and longitude 90 represent y- axis.

Now at any given latitude, longitude, and altitude, we can make a local coordinate system S whose y-z plane is tangential to earth's surface and z points to the north pole and x points perpendicular to this plane.

I need a 4x4 transformation matrix to transform a 3d point from earth-centric coordinate system E to this local coordinate system S.


Solution

  • Transformation matrix from S to E might be composed as product of matrices:

     Shift along X axis by R+Altitude
     Rotation about Y-axis by Latitude
     Rotation about Z-axis by Longitude
    

    Make inverse of this matrix to get E-S transform