Astronomical finding sheds light on Earth's future