# Cartesian components of ellipsoid's gravity field - looking for info

1. Jul 3, 2010

### Cleonis

I'm posting here, in the math forum, because my question is about handling the math of the problem.

On my website there are a number of simulations (in the form of Java applets), and among them is a http://www.cleonis.nl/physics/ejs/ballistics_simulation.php" [Broken].

The ballistics simulation is designed to be used for slow speeds and low altitudes (up to kilometers). Another version, called 'ballistics and orbits', covers the altitude range of satellite motion. For satellite motion it suffices to use as gravitational field the field of a perfect sphere. Currently the low altitude version also uses perfect sphere gravity, but I want to push for more: I want to model the gravity of the reference ellipsoid.

To do that I must implement the following two things:
- Geodetic coordinates for input and output, while using cartesian coordinates for the computation.
- The cartesian components of the reference ellipsoid's gravity.

I have found good information about interconverting between geodetic and cartesian coordinates. I don't expect major problems; if I need assistence with that I will ask for that later.

Cartesian components
What I don't have a plan for right now is how to set up the cartesian components of the reference ellipsoid's gravity.

As a first approximation for the magnitude of the gravitational acceleration, I can use McCullagh's formula, using only the first terms:

$$g = \frac{GM}{r^2} - \frac{3GMa^2J_2}{2r^4}(3sin^2\Phi - 1)$$

and the counterpart expression for the gravitational potential:

$$V = - \frac{GM}{r} + \frac{GMa^2J_2}{2r^3}(3sin^2\Phi - 1)$$

(There may be incorrect minus signs there; debugging the simulation should get that sorted.)

Now, in the case of homogenous sphere gravity I have set up the following the cartesian components:

$$g_x = - \frac{x}{\sqrt{x^2+y^2+z^2}} \cdot \frac{GM}{x^2+y^2+z^2}$$
$$g_y = - \frac{y}{\sqrt{x^2+y^2+z^2}} \cdot \frac{GM}{x^2+y^2+z^2}$$
$$g_z = - \frac{z}{\sqrt{x^2+y^2+z^2}} \cdot \frac{GM}{x^2+y^2+z^2}$$

The symmetry simplifies the expressions enormously. It's easy to see that the vector sum of the components is once again 'g'.

Reference ellipsoid
To obtain the cartesian components of the reference ellipsoid's gravity I suppose I need to use respectively x, y and z partial derivatives of the gravitational potential.

The tricky bit, it seems, is to make the vector sum of the components add up to precisely 'g'. My hope is that there is a neat and clean way of making that happen. I hope someone can inform me on this.

Cleonis

Last edited by a moderator: May 4, 2017
2. Jul 4, 2010

### Cleonis

Fortunately someone else who is in on the problem found the information I need: