In just a few short months, science fiction will morph into reality, as the U.S. Navy test fires a new electromagnetic "railgun" from one of its warships.

Ready to aim and fire -- behind the scenes at the Navy's new electromagnetic railgun. Source: U.S. Navy.

Last week, the Navy announced plans to test a prototype electromagnetic, or EM, railgun, a weapon that Rear Adm. Bryant Fuller, the Navy's chief engineer calls "an incredible new offensive capability for the U.S. Navy." According to a press release, plans are being worked up to send the railgun to sea aboard a Joint High Speed Vehicle sometime in the next two years. There, the Navy will confirm whether the weapon proves as "lethal and effective" for use against hostile warships, boats, aircraft, and missiles as it's already proven in land-based tests.

What it does
The Navy describes its railgun as "a long-range weapon that launches projectiles using electricity instead of chemical propellants." It works by utilizing an electromagnetic energy known as the "Lorenz Force" to rapidly accelerate and launch a projectile between two conductive rails, firing the projectile incredible distances, at incredible speeds.

The EM weapon can hit targets as far as 110 miles away, and, with shells traveling at speeds in excess of Mach 7 -- 5,000 mph -- the time between firing and "target destroyed" should be as little as 79 seconds.

Speaking of the shells, railgun-launched projectiles are only about 18 inches long. And because the projectiles themselves are so simple in design -- no explosive charge required, and no explosive warhead either -- they're cheap to get out, costing just $25,000 each. Relative to the price of a cruise missile with similar destructive power, which can cost in excess of $1 million, that's a bargain.

Who makes it
Currently, two defense contractors have designed prototype EM railguns for the Navy: General Atomics (better known for its "drone" aircraft than for its cannon), and BAE Systems (NASDAQOTH:BAESY) (LSE:BA), the big British defense contractor. Publicly traded U.S. defense contractor, General Dynamics (NYSE:GD), will also play a role in the planned fiscal-year 2016 railgun test -- but only as one of the companies building the JHSV from which the railgun will be test fired.

Usns Milli
America's third of 10 planned "Joint High-Speed Vehicle" troop transports, the USNS Millinocket (JHSV-3), will play host to its EM railgun. Photo: U.S. Navy.

What it means to investors
To date, the Navy has sunk at least $250 million into the EM railgun program. Plans are for a further $250 million to be invested in the weapon's development by 2017. At present, BAE and General Atomics have to be considered the leading contenders to win these funds, along with further funding to manufacture production copies of the weapon if tests prove successful.

The bigger impact, of course, may be on the defense contractors not chosen by the Navy to build its railguns. If a $25,000 railgun projectile can do the same job, the case for buying $1 million-plus Tomahawk cruise missiles from Raytheon (NYSE:RTN), not to mention shorter-range Harpoons from Boeing (NYSE:BA), will become much harder to make.

That will be good news for taxpayers, certainly. But it could be bad news for Raytheon and Boeing. Raytheon's biggest revenue driver (albeit not its most profitable) is the company's Missile Systems division, which generated $6.6 billion in revenues, and $830 million in operating profits, for the company last year. Boeing, meanwhile, is seeing its defense business depend more on the production of missiles and other weapons systems, as the company's historic dominance in military fighter aircraft wanes.

The key to preserving revenues for both companies may come down to a little-known Office of Naval Research program dubbed the "Hyper Velocity Projectile." Railgun projectiles may be faster and cheaper than a missile, but for now, missiles still retain one key advantage over cannon-shells -- whether rail-launched or otherwise -- in that missiles are guidable to their targets. This improves their accuracy, meaning fewer munitions need to be fired to ensure a target's destruction -- and carries less risk of collateral damage besides. What the HVP program aims to do is design a projectile that can hold up against the stresses of a Mach-speed railgun launch, and also carry the delicate, and miniaturized, instrumentation that enables the munition to be guided to its target with precision accuracy. The company that designs this projectile may well become the real winner of the race to railguns.

See the Navy's new EM railgun in action in this YouTube video:

Rich Smith has no position in any stocks mentioned. The Motley Fool owns shares of General Dynamics and Raytheon Company. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.