Daily Archives: August 21, 2006

Worse than Y2K–what if gravity changes?

Though the danger to life, civilization, and future of all that is good and beautiful was greatly oversold, Y2K was still a pretty big deal. It required the detailed analysis and updated of millions of lines of legacy code in all sectors, levels, nooks, and crannies of computer civilization.

We survived, somehow. Planes didn’t fall out of the air. Elevators did not plummet to the basement. Satellites did not launch lasers and nukes at random targets. Cats and Dogs did not start living together.

But what if something even more fundamental than our calendaring system changed?

What if a fundamental assumption about the way Earth functions changed?

Take, for example, gravity. The force of gravity is defined by the following equation:

 

Constants are:

  • G – universal gravity constant. 6.6742×10-11Nm2/kg2
  • M – mass of first object. Earth = 5.9724 x 1024 kg
  • m – mass of second object.
  • r – radius from center to center of objects. Earth = 6,378,100 m

This can be simplified for use on earth to:

where

  • m – mass of object on earth’s surface
  • g – earth gravity constant.

We can compute g by setting both equations equal to each other, canceling the common term of m, we get:

If we substitute the values above, we get  g = 9.801585

That’s the value that is a hard-coded into all the missile launchers, satellite control software, airplane flight control logic, embedded physics math processors, and Scorched Earth games in the world.

So what if it changed? It’s not likely, but it could happen. If a significant amount of mass were added or taken from the earth due to, say, a catastrophic asteroid hit, gravity could be affected. 

But how much would it have to change?

Given the current values, F = mg for 50 kg yields 490.08 N of force on the earth. If earth’s mass increased by 1%, g would be equal to 9.899601, and F would be 494.98 N. Would we feel heavier?

It would certainly destroy precision instrumentation.

However, 1% is a LOT: 5.9742 x 1022 kg. By comparison, the moon is 7.36 x 1022  and the mass of all known asteroids is less than that. On the other hand, if you think gravity can’t be affected by a reasonable event, read this.

So just to be safe for future modifications, make sure all your software takes as parameters G, M, m, and r, and calculates g as needed. You can never be too careful.

😉


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order: