**Theory**

The gravitational acceleration that an object experiences decreases the further it gets from the center of the Earth. The gravitational acceleration at sea level at any point on the Earth’s surface can be calculated using the International Gravity formula:

When at sea level the gravitational acceleration only changes with respect to the latitude and not the longitude. The Earth is not a smooth surface and as such we need to be able to calculate this acceleration at altitudes with respect to sea level. We can modify the previous formula so that an altitude (h) in meters can be used to calculate the correct gravitational acceleration.

**Application**

This function will take in a latitude and an altitude in meters. It will return a number representing the gravitational accelerations whose units are in

function gravitationalAcceleration(latitude, altitude)

{

var lat = DegToRad(latitude);

return 9.780327*(1+0.0053024*Math.pow(Math.sin(lat),2)-0.0000058*Math.pow(Math.sin(2*lat),2))

-0.000003086*altitude;

}

Listing 1 Gravitational Acceleration function

The following post has additional information on the DegToRad method: http://rbrundritt.spaces.live.com/blog/cns!E7DBA9A4BFD458C5!257.entry

### Like this:

Like Loading...

Mate, your formula is wrong. The second sine should be -0.0000058×sin²(2×theta).

Thanks for the correction. Looks like an oversight on my side.