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.

  • 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, 2016 at 18:55
  • 2
    @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, 2016 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, 2016 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, 2016 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, 2016 at 9:31

2 Answers 2


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".


I realise this is an old thread now but for future reference Earth is represented as a type of ellipsoid called an oblate spheroid. The oblate spheroid is a result of the balancing between self gravitation forces and rotation forces (centrifugal force) and this balancing intuitively results in an force vector that is equal at all points along the spheroid and normal to this spheroid (not the geoid).

Contrary to some comments on this post, the gravity vector WILL point directly towards the centre of mass of the oblate spheroid (not normal to the surface). It is the resultant force of the gravity vector and centrifugal force vector that causes the force that we experience to be normal to the surface of the Earth. This is called "Effective" or "Apparent" gravity.

A reference: http://www-gpsg.mit.edu/12.201_12.501/BOOK/chapter2.pdf

n-vectors are used in Geodesy (https://en.wikipedia.org/wiki/N-vector). They provide (in some circumstances) and alternative and singularity free representation of a Geodetic lat,lon representation and are defined as unit vectors that are normal to the reference spheroid (this seems to be what the question is about). The wikipedia article given above is quite good. The distance between the surface and the intercept of n-vector with the ECEF Z-axis is the prime vertical radius of curvature (again, wikipedia gives a good explanation of this). Using this, you can encode a normal vector with a known magnitude that represents a unique position on the surface of an oblate spheroid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.