While costume-clad children go door-to-door in search of candy this Halloween, an asteroid twice the size of a sports stadium will hurtle past Earth, narrowly avoiding a collision that could potentially wipe out an entire continent. 

And that's not even the scary part. 

Dubbed "The Great Pumpkin" by NASA's Jet Propulsion Laboratory, the TB145 asteroid has a diameter of 400 metres, twice the size of the Rogers Centre in Toronto, and it's travelling through space at the dizzying speed of 35 kilometres per second. 

But the more frightening part about the space rock, which has also been nicknamed "Spooky," is that we didn't even know it existed until Oct. 10 — not nearly enough time to stop it if it posed a threat — and we almost didn't spot it at all. 

"The aim of what we're doing is to find big objects like this well in advance of when they might hit the Earth," says Richard Wainscoat, the principal investigator for Pan-STARRS telescope in Hawaii, which first detected TB145. 

Asteroid

NASA says the asteroid, known as 2015 TB145, is about 400 metres across, nearly double the diametre of Toronto's Rogers Centre. (Duk Han Lee/CBC)

Scientists already know the next space rock due this close to our planet will fly by in 2027. So how did we miss TB145 until now?

Partly, it's because it wasn't where we usually expect asteroids to be, Wainscoat explains. "It has kind of a difficult orbit."

The Earth, the sun and most of the solar system's planets exist on what's called the ecliptic plane. Most of the asteroids that come anywhere near us also exist on that plane.

Not the Great Pumpkin, though. It cuts into the plane at an almost 40-degree angle.

What's more, it moves in an egg-shaped orbit, which means it moves more slowly when it's far away, but speeds up when it nears the Earth and zips by quickly.

great_pumpkin

This NASA graphic depicts the orbit of asteroid 2015 TB145. Nicknamed "The Great Pumpkin," it will safely fly past Earth slightly farther out than the moon's orbit on Oct. 31 at 1:05 p.m. ET. (NASA)

"The majority of surveys and searches for this kind of object are closer to this ecliptic part of the sky," Wainscoat says. "We looked in a sort of slightly unusual direction. It sort of makes me think that maybe we should be spending a little bit more time looking more in some of these unusual directions, looking for other objects that might be like this."

According to the Canadian post-doctoral researcher who first spotted TB145 during a morning shift at Pan-STARRS, it's a matter of luck that it was detected at all.

"We don't cover the complete sky," Robert Weryk of London, Ont., says. "If we hadn't been looking there at the time, and no one else had seen it, then it could have gone right by the Earth without anyone noticing."

'Complete devastation'

The Great Pumpkin will pass within 490,000 kilometres of the Earth on Oct. 31 at about 1:05 p.m. That's 1.3 times as far away as the moon.

"It's not going to crash into the moon," Paul Chodas, head of NASA's Near Earth Object program. assures. "We checked that."

Nor will it crash into the Earth. And for that, we can thank our lucky stars.

The Halloween asteroid is 20 times bigger than the meteor that exploded with the force of 20 atomic bombs over Chelyabinsk, Russia, in 2013, injuring more than 1,000 people and blasting out windows across the city.

RUSSIA-METEORITE/

A policeman works near the point of impact of a meteor some 80 kilometres west of Chelyabinsk on Feb. 15, 2013. The meteor streaked across the sky and exploded over central Russia sending fireballs crashing to Earth, which shattered windows and damaged buildings, injuring more than 1,000 people. (Chelyabinsk region Interior Ministry/Reuters)

If TB145 collided with the Earth, it would have the impact of 10 gigatonnes of TNT, says Wainscoat. "An unbelievable amount of energy, just complete devastation."

Our only recourse would be to figure out where it was going to hit and evacuate the impact area, says Chodas. 

"Something that size would cause really continent-wide devastation, if it should hit a continent. Or if it hit the ocean, a pretty large tsunami."

How to fight an asteroid

If we detect an Earth-bound asteroid well ahead of time, Wainscoat says authorities have a few tricks up their sleeves. 

"It can be thought of as one of the only kinds of natural disasters that we can actually do something about," he says. 

Some of the possible game plans are surprisingly similar to the plot of Armageddon — except, (spoiler alert) we won't have to sacrifice Bruce Willis

Pan-STARRS

The Pan-STARRS in Hawaii is one of the few telescopes in the world that monitors space for asteroids. It's how scientists discovered TB145. (Rob Ratkowski/University of Hawaii/Handout )

One option is to deploy nuclear weapons, Wainscoat says. Or, in another scenario, "a heavy object is sort of rammed into the asteroid and the hope is that you deflect the orbit."

A slightly less flashy approach would be to use a "gravity tractor," which basically means parking a spacecraft nearby so that, over time, the gravitational pull would alter the asteroid's orbit.

But all this stuff is theoretical. And the better we understand how asteroids work and what they're made of, the better chance we'll have of deflecting one, scientists say. 

That's where the Great Pumpkin comes in. 

A Halloween treat for NASA

The asteroid's proximity to Earth means scientists are going to be able to gather huge amounts of new data. 

"People, rather than being alarmed, should be saying, 'Wow, this is terrific!' Because we're going to learn a lot about this object," says Alan Hildebrand, a University of Calgary professor and co-principal investigator of Canada's asteroid-hunting satellite NEOSSat.

'People, rather than being alarmed, should be saying, 'Wow, this is terrific!'  - Alan Hildebrand, University of Calgary

NASA plans to bounce radio waves off the asteroid from the Deep Space Network at Goldstone, Calif.

The radar echoes will then be collected by observatories in West Virginia and Puerto Rico.

With that information, they'll be able to discern TB145's precise size and composition. They'll be able to see if it has a moon, and if so, study its orbit.

"It's scientifically a great opportunity. Instead of sending an expensive mission out to look at an asteroid up close, the asteroid is coming to us," says Chodas. "It's kind of a freebie."