# Find gravity normal by ECEF or GPS coordinate of point

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

Is it the same as normal to elipsoid? Is this ordinary way to calculate normal to ellipse? I'm not quite sure which altitude is GPS use, but it seems if it use geodetic latitude it already perpendicular to elipsoid. And same about ECEF 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;
double Y1= ecef;
double Z1= ecef;

double c= sqrt(X1*X1+Y1*Y1);

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.

• The gravity normal would point to the center of the Earth, whereas the ellipsoid normal would be perpendicular to the ground. It turns out these aren't equal, precisely because the Earth is an ellipsoid. – user1462 Jan 27 '16 at 18:55
• @barrycarter That is not correct. The gravitational normal will be perpendicular to either the ellipsoid or the geoid, depending on what is meant by that term. At almost every point on earth it will not pass through the center. Our site has plenty of material on this subject: see gis.stackexchange.com/questions/53728 and gis.stackexchange.com/questions/25982 for instance. – whuber Jan 27 '16 at 19:58
• @whuber So you're saying gravity does NOT pull most people towards the center of the Earth? Or does gravity normal mean something different than the direction of gravity? – user1462 Jan 27 '16 at 20:02
• That first statement is correct, @barrycarter. It might not seem so counterintuitive if you considered a more extreme ellipsoid that approximates a pancake shape. The normal to the ellipsoid would be precisely the direction of gravity if the earth were a homogeneous stationary mass shaped like that ellipsoid. Anybody can find their local normal (to the geoid, which is very close to the ellipsoid) by dropping a plumb bob or floating a level in a puddle--but that normal will not point through the earth's center (except at very special locations). – whuber Jan 27 '16 at 20:08
• @whuber so how to find the normal to elipsoid passing through point not lying on elipsoid? Will it be precise enough or do we need to use geoid? – mrgloom Jan 28 '16 at 9:31