A space mission launched by a primary school soared 20 miles into the sky and endured temperatures of -38°C to take these spectacular pictures.

Pupils, staff and parents at Ysgol Gymraeg Aberystwyth launched a weather balloon from the school yard which carried an onboard camera, GPS trackers and a computer to measure altitude, temperature and the motion of the balloon.

The technology for the mission was developed by Dr Mark Neal, a parent at the school and coordinator of the Intelligent Robotics Research Group at Aberystwyth University’s Institute of Mathematics, Physics and Computer Science.

While the highest point recorded during the mission was 26,382.45m, Dr Neal believes it may have reached about 32,000 metres (20 miles) as the instruments indicate it kept on climbing for some time after the highest reading was taken.

At the balloon’s highest recorded point, the temperature was -38.39°C. The balloon landed two hours and 51 minutes after launching on Thursday, and was found in a field in Llandrindod Wells 49.6km from the school.

Dr Neal said: “Technically, I’m amazed at how well everything has gone, including the launch and the way the equipment on board has worked. The ease with which we got the capsule back was a surprise. In all honesty, I expected to spend days looking for it.

“The images and the data we collected have made this all so worthwhile. However, none of these sensors we used are rated to anything like the low pressures and temperatures they would have experienced on a mission like this one, so the data must be treated with a pinch of salt.”

Clive Williams, headmaster of Ysgol Gymraeg Aberystwyth, said: “From the very beginning, the whole event has created a buzz of excitement in the school and a real desire among the pupils to learn more about the world around us, the environment we live in and space.

“As one would expect with any space mission, there was always an element of uncertainty that everything would work.

“To find the capsule in a field near Llandrindod Wells and to be able to get the stunning images taken by the onboard camera prove beyond any doubt that this is a mission accomplished.”