What just happened? The testing of a new algorithm designed to identify potentially hazardous asteroids discovered an object in space matching that description. Set to be used in the upcoming Vera C Rubin Observatory in Chile, the algorithm confirmed the presence of a rock measuring 600 feet in length that could come worryingly close to our planet.

The HelioLinc3D algorithm was tested on data from the Asteroid Terrestrial-impact Last Alert System, or ATLAS, a NASA-funded asteroid impact early warning system developed by the University of Hawaii.

The test run identified the 600-foot-long rock, which was named 2022 SF289. As its diameter is over 406 feet and it could come within 5 million miles of Earth's orbit around the sun, it has been designated as a potentially hazardous asteroid.

Checking the ever-concerning Asteroid Launcher website and picking New York as an impact point gives an idea of the kind of damage 2022 SF289 could do if it hit us. Selecting an average asteroid speed of 18km/s and a 45-degree impact angle, an object of this size would leave a crater just over 1,600 feet wide and almost 340 feet deep, hitting with the force of 172 Megatons of TNT and vaporizing 146 people. There would also be a massive shockwave and 24km/s wind blast, killing millions of people.

But we can breathe a sigh of relief as the asteroid isn't expected to pose a threat to Earth at any point in the foreseeable future - projections of its orbital path show the closest it will come to our planet is 140,000 miles.

Discovering 2022 SF289 also confirms that the algorithm can be used to find more dangerous asteroids when the Rubin Observatory is operational in a couple of years.

"By demonstrating the real-world effectiveness of the software that Rubin will use to look for thousands of yet-unknown potentially hazardous asteroids, the discovery of 2022 SF289 makes us all safer," said Ari Heinze, principal developer of the HelioLinc3D algorithm.

2022 SF289 wasn't initially identified because it passed in front of the Milky Way's bright stars making it difficult to see. A 200-foot asteroid that just missed Earth last month wasn't detected until two days later as it traveled toward us from the sun and thus was hidden by the star's glare.

The algorithm works by processing observations taken from multiple nights. Heinze explained to The Reg that normal algorithms try to discover an asteroid based on just one night of data, and can't discover asteroids that were only sighted two or three times due to junk detections like glare from stars.

"The power of HelioLinc3D is that we can make 'impossible' discoveries of asteroids that were never sighted four times in a single night. To do this, we first find all the sets of two or three detections in a line on any night. The vast majority of these are junk, but some are real asteroids," he explained to the publication. HelioLinc3D uses factors such as the Sun's gravity and orbital mechanics to assess objects.

"Any one of these sets, individually, looks like junk – and thousands of similar sets on each night really are junk – but the fact that this particular sequence of sightings lines up along a perfect orbit from night to night proves that they correspond to a real asteroid."