NASA is set to launch a spacecraft to the sun in 2018.

The Solar Probe Plus is intended to fly within 4million miles (6 million km) of the massive star.

To put that into perspective, Earth is around 93 million miles (149 million kilometers) from the sun.

The main objective is to gather data that will help scientists to forecast major space weather events that can affect Earth.

Without advance warning, a major solar storm could knock out communications on Earth and cause millions of pounds worth of damage.

If successful, this will be the closest a manmade object has ever been to the sun, more than seven times as close as any spacecraft has been before.

“This is going to be our first mission to fly to the sun,” Eric Christian, a NASA research scientist at Goddard Space Flight Center, told Live Science.

“We can’t get to the very surface of the sun,” he added, but the probe will get close enough to gather vital data.

The space probe has a planned launch window between 31 July and 18 August 2018.

After launch, the mission is set to last six years and 11 months.

The Solar Probe Plus will use seven flybys of Venus to gradually shrink its orbit around the sun until it reaches its closest point.

At its closest approach, the unmanned spacecraft will be travelling at a speed of 450,000 miles (725,000 km) per hour.

Data gathered will help scientists to better understand how solar storms are formed

The mission, which is a joint effort between NASA and John Hopkins University Applied Physics Laboratory, will also aim to explain why the atmosphere surrounding the sun is hotter than the surface itself.

Instruments aboard the space probe will be protected from solar radiation by a 4.5-inch-thick (11.43 cm) carbon-composite shield.

This will need to withstand temperatures of nearly 2,500 degrees Fahrenheit (1,377 degrees Celsius).

The Helios 2 space probe holds the record for being the spacecraft to have travelled closest to the sun.

Launching in January 1976m the probe flew to within 26 million miles (43 million kilometers) of the sun.