Heart of James Webb: NASA revealed the main secret of the telescope

The James Webb Space Telescope pleases mankind with its amazing photos of both the deep Universe and the nearby objects of our Solar System. We are surprised by the quality of the images received. But how is the telescope controlled and what commands do engineers and operators work with to give orders to JWST? If you are a programmer, then you will be surprised.

You look at the stars, and programmers see semicolons. Image: NASA

It turned out that one of the best and modern scientific tools of mankind is guided by not the most convenient programming language. So, NASA uses JavaScript to “communicate” with James Webb. This programming language is used on 98% of websites on the Internet, but developers often complain about it for its specific logic and limited capabilities. However, JavaScript is responsible for all photos taken from the telescope.

JavaScript and ISIM

As the documentation of the Integrated Science Instrument Module (or ISIM) JWST explains, the software for ISIM is controlled by scripts that are written in JavaScript, after receiving the appropriate command. Simply put, James Webb has a built-in scripting processor that receives instructions on exactly what to do in JavaScript. Moreover, the actual code responsible for converting JavaScript scripts is able to run and execute up to 10 tasks simultaneously.

A script processor is something that actually performs tasks, but it receives instructions through JavaScript. Diagram: NASA

There is already a package of written scripts on board JWST to perform specific tasks. Scientists on Earth simply need to order the telescope to perform these tasks. When the command is sent, the JavaScript codes are interpreted by the script processor, which then communicates with the onboard systems and includes the necessary modules. For example, it is possible to control maneuvering engines to change the position in space, adjust mirrors or focus on space objects. ISIM is a set of telescope tools with which it takes pictures, and JavaScript scripts control this process. NASA calls ISIM “the heart of the James Webb Space Telescope.”

Outdated technologies

The NASA document says that the developed control system “gives personnel greater visibility, control and flexibility over telescope operations,” allowing them to easily change scenarios by learning the ramifications and subtleties of working with instruments. But a knowledgeable reader will still have a question – why this language? There are more convenient and attractive options: Python, C#, Rust, Ruby or Go. 

JavaScript is only part of the puzzle, but it is important. Diagram: NASA

Of course, JavaScript can hardly be called a modern language for controlling a super-modern telescope at a price of USD 10 billion. But the fact is that the SDK Nombas ScriptEase 5.00e from 2003 is used to write these commands. That is, many readers of this news were not even born when the software controlling James Webb appeared. The funny thing is that Nombas itself went bankrupt back in the 2000s.

“Simplified” architecture scheme. Diagram: NASA

However, there is an explanation why it happened. The development of the space telescope began a long time ago – in 2004. At that time, ScriptEase 5 was only two years old, so using this toolkit as sending commands seems quite natural. However, don’t worry, the script handler itself was written in a powerful and trouble-free C++ programming language.

Weaker than a smartphone

But this is not all that can surprise James Webb. As it turned out, the 10-billion-dollar tool is equipped with a file storage of only 68 GB. Yes, the solid-state drive of this telescope has about the same capacity that was in the original 2008 MacBook Air. It does not even compare with the iPhone 13, in which the memory capacity already starts from 128 GB. That is, the amount of the built-in JWST drive is even smaller than in your modern laptop or even smartphone. 

The James Webb Space Telescope. Illustration: The Verge

Of course, the telescope itself is experiencing a lack of memory. On average, depending on the task and the intensity of observations, this entire volume can be filled in just 2 hours, so JWST is in constant communication with NASA specialists constantly uploading data to servers on Earth.

Earlier we reported on how the secret of James Webb’s bright photos was revealed.

According to The Verge

Follow us on Twitter to get the most interesting space news in time