This is not quite true. Newtonian physics means that every time you fire a shot from said orbital railgun you end up accelerating the railgun in the opposite direction - this requires thrusters or some such system to perform stationkeeping. If you do this, then you have to expend twice as much energy per shot - one set to fire, and one to counteract the resultant thrust.

The ideal place for an earth-threatening railgun would be on the Moon's surface. For an excellent description of such a system, see Robert A. Heinlein's book The Moon is a Harsh Mistress.

Some ripostes to Azure Monk's excellent w/u below:

The major advantages of a lunar-situated railgun are (as I see them) the following:

• You have lots of time to see an attack coming, and the distance is such that a directed-energy attack is highly unlikely due to the fact that the power of an electromagnetic beam at any distance d compared to its intensity at start is (I think, IIRC) 1/d^3. It'd be reaaalllly hard to damage anything on the lunar surface with a beam weapon from Earth, not even taking into account the problems of motion.
• It's actually a lot easier to shoot at something in orbit (especially LEO) than at something on the moon. The calculations are simpler. It's a lot easier to track your target. There's only one orbital state to track, not two.
• The max power of the orbital railgun will swiftly run up against size limitations. The lunar version wouldn't have these problems, and could use less efficent/more redundant components.
• The lunar railgun needs to use less power to achieve the same impact velocity. Why? Because you're taking advantage of the gravity well! You only need to boost to lunar escape velocity to have gravity do a great deal of the work as your projectile 'rides' the gravity well towards earth, trading its potential for kinetic energy all the way. Think of it as dropping something from the height of the moon, with only the last little bit of flight troubled by atmospheric resistance.
• Support of the railgun (people, materials, solar power) is easier with a gravitational field and solid surface to walk on. Also, your staff can burrow to protect themselves from counterattack! You could even put the whole apparatus under the regolith if you were willing to spend the resources!

Admittedly, there are disadvantages, as Azure Monk points out. The big problems are, in my opinion:

• Aiming. Your aiming calculations suddenly get really complex. It's highly unlikely this is going to be an assassination weapon (although, to be fair, I was never thinking of it that way). It's much more like an atomic bombardment tool without requiring atomic weapons...and if you vary the payload size down far enough, you could do some fairly high-energy but limited-spread damage due to the energy being kinetic and not radiative (at least at impact).
• Reaction time. Shots would probably require lots of precalculation and 'monitoring' as they travelled, and perhaps even a manveuring system to correct for gravitational flux and error.
• Fixed launching direction, if the 'gun' is big enough. You'd have to 'aim' entirely with timing, orbital dynamics and perhaps projectile maneuvering.

Oh, and to address one final point: If the railgun was laid fairly flat along the moon's surface, the energy transfer would be to the moon's rotational, not orbital velocity. I seriously doubt this would be a problem given the magnitudes we're talking, but if it was, just build another facing the opposite direction and alternate shots.

My response to Azure's response to my...oh, never mind. ;-)

I think the root of our semisquabble is that I in no way intend to try to hit small, precise or mobile targets. :-) I'm operating under the assumption that tracking a moving target would require inordinately capable sensors and commlinks. In addition, in order to minimize travel time on the shot, the amount of energy you'd have to put into the projectile would mean that achieving zero or even minimal collateral damage would be well-nigh impossible.

I'd also think that while stealthing the orbital railgun is workable, there's one problem. It's gonna generate one enormously fscking huge electromagnetic pulse when it fires. That's how it works.

Finally, since I'm not trying to hit moving targets, but level large immobile ones like, say, Cleveland, I can use minimal energy and just let the gravity well do my work. Unless someone's figured out how to move Cleveland out of the way, I'm probably okay. I *am* more vulnerable to interception; however, if I am using a lower shot energy and moving slowly, I can minimize any course correction burn intensity as well as have a better shot at avoiding detection of the initial shot. For a highly dramatized example, see Robert A. Heinlein's The Moon is a Harsh Mistress.

Whew. Okay. We both win. :-) :-0

Woohoo! booger, here's my response:

If you have a projectile that's dense enough and moving fast enough, you won't have to worry about the atmosphere. Especially if your goal is city-sized destruction. An airburst is actually a better goal, where all it has to do is get down to like 50,000 feet if the impact energy is above, say, 10 megatons.

Now, if you're trying to destroy smaller targets, you're in even better shape...a really dense, heat-resistant small projectile (like, say, a tungsten or depleted uranium or osmium rod) can be launched at pretty high speed (or from really far out, but the math and response time get freaky). The havoc wreaked on a modern tank by another tank comes from a small penetrator of several kilos mass hitting the tank at between 1,000 and 2,500 m/sec. If you made a projectile that had an osmium sheath with a softer material under an ablative or frangible endcap, it would balloon out on impact with a hard object (you could tune that) and transfer all of its energy quickly. Tank rounds have been designed to do that. These rounds have no trouble dealing with atmospheric friction at those speeds for a couple of miles of STP; although the duration would be longer from orbit down, I bet it wouldn't be a big issue. Heck, if pieces of Skylab can hit the ground, made mostly of aircraft aluminum...:-)

Kuraijo: Not quite right. Terminal velocity assumes that the object is being acted on by gravity and air resistance as it accelerates, causing it to reach a plateau. While this would be true, if the projectile is accelerated outside the atmosphere to a high enough velocity, there won't be nearly enough atmospheric travel for it to slow down to anywhere near terminal velocity.