Earth logo

In 17 days, I photographed the International Space Station 400 kilometers away with 600 lines of code.

Only when these two conditions are met at the same time can we have the opportunity to observe and photograph the space station on the ground, but the effect is also affected by factors such as weather (such as cloudy weather in the picture):

By gaisndm HawkshawPublished 2 years ago 6 min read
Like

Tu Yuan Zhu Yijing & Xu Chengcheng, authorized

However, at present, several common methods for shooting celestial bodies are not suitable for taking higher-precision photos of the space station.

The first method is to shoot directly through a "hand" telescope, that is, to track celestial bodies by pushing the telescope.

One drawback of this method is that it is impossible to shoot a very high-definition space station. Because it has to be tracked manually, you can't find it directly with a telephoto lens, otherwise it's like using a microscope to capture a fast-moving ant, and the space station disappears out of the camera inadvertently.

The second method is to set up all kinds of high-definition lenses and equipment and wait for the space station to "pass" in place, just like "waiting for the rabbit".

This method does not need to move the camera, but instead waits for the space station to "pass" on its own. But it also faces some new problems, such as the space station "passing by" time is very short, sometimes only a few seconds, may not be captured; even if the shot, due to unable to adjust the angle and other reasons, the effect is not guaranteed.

So why not shoot with the tracking function that comes with the telescope?

This function is usually only used to track the rise and fall of celestial bodies such as the sun, moon, planets and stars due to the rotation of the earth. after all, they do not move fast and are basically synchronized with the rotation of the earth. But for fast-moving celestial bodies such as the space station, the telescope itself cannot catch up.

Therefore, in the end, we have to rely on the program to realize the tracking and shooting of the high-precision space station.

The third method is to use the number of orbital elements (that is, orbital parameters) to track, that is, to use the celestial information found on various astronomical websites (such as Heavens-Above, etc.) to adjust the tracking path of the telescope and correct it manually:

At present, most astronomy enthusiasts use this method to track and fine-tune, and there are some relatively mature programs on the Internet, such as the effect of using electric theodolites to track space stations according to orbital parameters:

Tu Yuan Wang Zhuoyi, authorized

BUT, you never know whether or not these astronomical websites will be updated in time. Sometimes the space station temporarily adjusts its orbit, but if the website is not updated, your program will fail.

Using optical recognition, the error is controlled within 4 pixels.

As a fan of heaven, Liu Boyang cannot fail to understand all the above-mentioned problems.

His initial idea was to find the "light spot" in the lens through some existing software, and to identify and track the target based on the optical recognition method.

However, when he looked for the right programs, he found that they were either unmaintained (even the Windows version was too old to use), untimely updates and complex systems, or simply closed-source charges.

Therefore, Liu Boyang finally decided to start by himself, write an automatic tracking script for optical recognition, manually find the space station and control the tracking based on PID.

His plan is divided into two steps:

The first step is to write a program to automatically identify and track the space station by the telescope, which takes 5 days to complete.

It is worth mentioning that optical recognition is not Liu Boyang's "first-hand choice."

He did think of tracking with parameters + manual fine-tuning, including stepless control of equator speed with a rocker, rough tracking with track elements, stepless fine-tuning with game handles, etc., but the trial result was not ideal (the hand was not stable enough during fine-tuning).

Therefore, he wrote a method of optical tracking based on the principle of PID control. This is a very classic control algorithm. PID refers to proportional, integral and differential units, such as keeping a two-wheeled robot car in balance.

Liu Boyang had not learned this knowledge before, but in order to establish a stable automatic control system, he naturally introduced proportional unit (P) and integral unit (I) to reduce the error of the system.

Liu Boyang's telescope is divided into two parts: a star-finder with a larger field of view and a main mirror with a smaller field of view. The basic goal of this algorithm is to calculate the magnitude of the deviation from the field of view of the main mirror according to the position of the current space station in the star search mirror, so as to adjust the tracking speed of the telescope so as to correct the deviation and make the space station fall into the field of view of the main mirror.

Using this program, the star finder can quickly follow the moving "light source" of the space station, keeping the space station in the center of the field of vision. Liu Boyang tried to use a laser pointer to create a bright spot moving at a uniform speed on the wall of his home to simulate the movement of the space station, and the effect was good:

The program itself is based on a platform called ASCOM.

It can integrate all the configurations of astronomical equipment, such as the focal point of the telescope, the rotation of the filter, and the opening and closing of the camera, into a single software. it is a software interface standard widely used in the astronomical field.

In hardware preparation, in addition to laptops, it also includes:

11-inch aperture, focal ratio fhammer 10, catadioptric startrand EdgeHD telescope, equipped with CGEM equator

Canon EOS R5 camera

QHY5III462c camera, as a star guide camera

Picture Mastert T16000M game handle

Among them, the telescope is about 40, 000 yuan, the canon EOS R5 camera is rented for two weeks for 2200 yuan (the market price is 25000 yuan), the 462c camera is less than 1000 yuan, and the handle is bartered with friends (the market price is more than 500 yuan).

The whole cost is less than 45000 yuan, according to Liu Boyang. If the precision requirement is not so high, the whole set can be completed in less than 10, 000 yuan.

Next, in the second step, we took actual photos on the spot and successfully took high-precision photos of the space station with the equipment.

But unexpectedly, the actual shooting is more difficult than expected, during which Liu Boyang "has been repeatedly trial and error to fix the bug."

His initial goal was to capture the Chinese space station, but he went out of bug twice in succession, resulting in missing the best time for two observations.

On March 23, due to the failure to focus in time, the automatic optical tracking did not work; on March 27, because the field of view of the star finder was only about 3 °, the small field of view led to the failure of the initial acquisition and failed to enter the automatic tracking process again.

There is still a long way to go before the next visible transit of the Chinese space station. Therefore, after fixing the operational problems (increasing the field of view of the star-finding mirror to 15 °), Liu Boyang decided to "practice his hands" with the International Space Station, which is about to have several excellent transit times.

Therefore, after changing the "capture" in the automatic tracking program to be triggered manually, Liu Boyang successfully verified the function of the program on April 2.

Although there are still some imperfections, such as the loss of calibration data of the star finder and the primary mirror due to the software crash, Liu Boyang added the calibration data recording function to solve this problem.

By this time, the code has changed from 400 lines to 600 lines.

Finally, on the evening of April 3, after emergency repair of bug, Liu Boyang successfully captured the International Space Station.

Specifically, the telescope's capture of the space station is divided into two axes: the x-axis and the y-axis. After

Science
Like

About the Creator

gaisndm Hawkshaw

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.