The sun's sporadic release of matter, which can disrupt power lines and spacecraft, will be predictable within two years.
The bombardment of earth with a huge cloud of matter can prove very damaging and magnetic storm warningswill enable people to take action beforehand.
Results from the Ulysses satellite, which is circling the sun, are giving insights into the "coronal mass ejection", which happens frequently but at times reaches earth. Ulysses spotted such a cloud of material last year as it was blown off the sun. But the data has only now been processed and linked with data from other spacecraft.
Richard Marsden, European Space Agency project scientist for Ulysses, said: "Material is blown off the sun at times of high activity. The material takes four days to travel from the sun to the earth. It collides with earth's environment and compresses its magnetic field." This leads to magnetic storms which can induce large electric currents in long cables, such as power networks. A storm in the 1980s disrupted much of the power supply to Quebec, for example.
The storms can also distort the orbit of spacecraft around the earth, shortening their lifetimes.
Ulysses was able to measure aspects of the cloud such as its temperature and its arrangement. Dr Marsden said Ulysses's measurements, combined with information from spacecraft that can monitor clouds from various positions should lead to an early warning system "within the next two to three years".
Ulysses is a joint project of the European Space Agency and NASA.