[GIS] Find gravity normal by ECEF or GPS coordinate of point

coordinate systemgeoidgpswgs84

How to find gravity normal by ECEF or GPS coordinate of point?

Is it the same as normal to elipsoid?

enter image description here

Is this ordinary way to calculate normal to ellipse?

enter image description here

I'm not quite sure which altitude is GPS use, but it seems if it use geodetic latitude it already perpendicular to elipsoid.
enter image description here

And same about ECEF
enter image description here

To compute normal(I want it in ECEF) I need 2 points, 1st point I get directly from GPS coordinate converting it to ECEF and 2nd point I need to compute.

For example point that have Z=0.

code :

Vec4d ecef= GPStoECEF(gps);

double Radlat = gps.latitude * (pi / 180); //assume we have geodetic latitude
double Radlon = gps.longitude * (pi / 180);

double X1= ecef[0];
double Y1= ecef[1];
double Z1= ecef[2];

double c= sqrt(X1*X1+Y1*Y1);
double h= c-Z1/tan(Radlat);

double X2= h*cos(Radlon);
double Y2= h*sin(Radlon);
double Z2= 0.0;

Vec4d ecef_normal(X2-X1,Y2-Y1,Z2-Z1,1.0);

Are my conclusions correct?

What I'm generally trying to do is to determine tilt from gravity normal of some tall object (like Leaning Tower of Pisa) having GPS positions of top point and ground point.

Best Answer

The normal to the ellipsoid is the vector orthogonal to the tangent to the ellipsoid at that point. This will not point to the center of the earth except at the equator and the poles.

The gravity vector is orthogonal to the geiod and varies from the ellipsoidal normal by an amount called the deflection of the vertical. Which is usually expressed in the north-south and east-west amounts. This is what I believe you want to calculate.

Look at NOAA NGS website they have a program with source for computing deflection of the vertical called "deflect".

Related Question