A method for controlling an astronomical telescope using Skymap
Patent Information
- Application Number
- CN202211148461.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2042-09-21
AI Technical Summary
The existing technology is difficult to intuitively and easily select and accurately obtain the current position of the target celestial body, and the commonly used methods are complex in calculations and error-prone. Skymap's telescope drive is only suitable for RS232 interface telescopes, but not for professional astronomical telescopes.
By running Skymap and a separately compiled astronomical telescope control program on the computer, the Skymap telescope drive interface is used to automatically find stars and track celestial bodies. This method is suitable for any computer interface, including USB interface, TCP/IP network interface, and I/O parallel interface.
It realizes intuitive selection of celestial bodies in the Skymap graphical interface, avoids complex astronomical calculations, is suitable for multiple interface types, expands the interface type of the telescope, and realizes flexible control and high-precision tracking of the telescope.
Smart Images

Figure CN115540855B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of astronomical telescopes, and in particular relates to a method for controlling an astronomical telescope by using Skymap. Background Art
[0002] Astronomical telescope control program is a computer application software, the main function of which is to control the rotation of the astronomical telescope, point to the target celestial body and continuously track the celestial body. There are a huge number of celestial bodies, and the movement rules of stars, planets, satellites, etc. are different, and their positions in the sky are changing all the time. Intuitively and easily selecting the celestial body you want to observe, and accurately obtaining or calculating the current position of the celestial body, is the prerequisite for controlling the astronomical telescope to point to the target celestial body and conduct observations.
[0003] The position of a celestial body can be measured using coordinates of a variety of coordinate systems, including horizontal coordinates, equatorial coordinates, hour angle coordinates, etc. The equatorial coordinates are divided into epoch positions and apparent positions. The epoch position is the equatorial coordinates of a celestial body at 2000.0, or 00:00 Universal Time on January 1, 2000. It is equivalent to the household registration information of a celestial body and is generally provided by an observatory in the form of a data file, which contains information such as proper motion and apparent velocity, and is called a "star catalog"; the apparent equatorial coordinates are the equatorial coordinates of a celestial body at the current moment, after various errors have been basically corrected, and are independent of the time and the position of the observation point in a short period of time. The apparent equatorial coordinates can be calculated from the "star catalog" and the information of the observation point, but the calculation process is extremely complicated.
[0004] Select a celestial body and obtain its position information, automatically find stars and track the celestial body. There are currently three commonly used methods:
[0005] 1. Design an input box for celestial body position information in the telescope program, first manually query a paper star catalog or an electronic star catalog, enter the apparent equatorial coordinates of the celestial body in the input box, and then let the telescope program calculate the real-time position of the celestial body, control the telescope to point to the celestial body and conduct tracking observations; the disadvantage is that the workload of querying and inputting celestial body information is extremely large, not intuitive, and prone to errors.
[0006] 2. In the telescope program, a graphical interface is constructed based on the "star catalog". A celestial body is selected in the interface. The real-time position of the celestial body is calculated according to the celestial body information and observatory information in the star catalog. The telescope is controlled to point to the celestial body and conduct tracking observations. The disadvantage is that the calculation is complicated, involving a lot of astronomical expertise, the visualization performance and functions are not rich, and the versatility is poor.
[0007] 3. Use commercial electronic star map software to select celestial bodies, and send control commands directly to the telescope through the telescope driver interface of the electronic star map to make the telescope point to the target celestial body. However, Skymap's telescope driver is only for the RS232 serial interface of portable telescopes, and is not suitable for professional astronomical telescopes, because most portable telescopes on the market use RS232 interfaces.
[0008] Skymap is a commercial computer astronomy star map software that uses intuitive flat graphics to display the starry sky. By selecting a celestial body on the star map with the mouse and keyboard, you can obtain various information about the celestial body, including epoch position, current horizon coordinates, apparent equatorial coordinates, etc. Skymap also provides a telescope driver interface. After selecting a celestial body, the telescope driver can be used to control the telescope to point to the selected celestial body.
[0009] Skymap provides a framework model for telescope drivers. Each telescope driver is a DLL dynamic link library, including 9 functions with function names defined by Skymap, namely (1) DLL entry (2) telescope model description (3) callback function name supported by the driver (4) get serial port parameters (5) initialize the serial port and connect the telescope (6) get telescope position parameters (7) automatically point to the selected celestial body (8) synchronize telescope function (9) set telescope position (10) set telescope time. The contents of these functions are filled in by the telescope provider.
[0010] The dynamic link library can be compiled in any programming language, and after compilation, it becomes a *.Dll dynamic link library file. Then, its file type is changed to drv, becoming a *.drv file, and placed in the driver folder of the Skymap installation directory. When the user selects the "Telescope-Configure" menu item in the Skymap interface, the star map will automatically execute the function (2) of each drv file in its driver folder, and fill the obtained telescope model description information into the telescope list. After the user selects the telescope model, click the "Telescope-Open Connection" menu item, and the star map calls the function (5) of the telescope driver to connect and initialize the telescope. After that, the target celestial body can be selected in the star map interface, right-click on the celestial body, and execute "Go to *** Celestial Body" in the pop-up menu. Skymap will automatically execute the function (7) of the telescope driver and pass the apparent equatorial coordinates of the selected celestial body as parameters to the function (7). At the same time, the star map periodically calls the function (6) of the telescope driver to obtain the rotation angle information of the telescope, and uses the hour angle and declination coordinates of the telescope as function parameters and returns them to the star map. In this way, information interaction between the star map and the telescope is realized.
[0011] Skymap's telescope driver model is designed for portable telescopes with RS232 serial interfaces, so it provides functions (4) to obtain serial port parameters and (5) to initialize the serial port and connect the telescope. In its Demo program, examples of function (6) are also functions for reading and writing RS232 serial ports. However, the information transmission rate of the RS232 serial port is extremely low, which is not suitable for telescopes with better performance. It provides fewer control functions and feedback information. Summary of the invention
[0012] In view of the above-mentioned deficiencies in the prior art, the present invention proposes a method for automatically finding stars and tracking celestial bodies by controlling a professional astronomical telescope using Skymap.
[0013] To achieve the above object, the present invention provides the following technical solutions:
[0014] A method for controlling an astronomical telescope using Skymap, comprising Skymap and a separately compiled astronomical telescope control program running on the same computer as the Skymap;
[0015] The operating system on the computer is any version of Windows;
[0016] The telescope interface functions provided by Skymap include: the first function, i.e., Dll entry; the second function, i.e., telescope model description; the third function, i.e., the names of various callback functions supported by Skymap; the fourth function, i.e., obtaining serial port parameters; the fifth function, i.e., initializing the serial port and connecting the telescope; the sixth function, i.e., obtaining telescope position parameters; the seventh function, i.e., automatically pointing to the selected celestial body; the eighth function, i.e., synchronization telescope function; the ninth function, i.e., setting the telescope position; the tenth function, i.e., setting the telescope time;
[0017] The method comprises:
[0018] In the sixth function, the Position.txt file in the folder where Skymap is located is opened in a shared way. The Position.txt file contains the telescope's current right ascension and declination information written by the telescope program. The right ascension and declination information is read and stored in the sixth function's parameters doubledRA and doubledDec. Skymap will automatically call the sixth function and get the telescope's right ascension and declination from its parameters doubledRA and doubledDec, and display the position the telescope is pointing to with a crosshair on the star map interface.
[0019] In the astronomical telescope control program, periodically open the Position.txt file in the folder where Skymap is located in a shared manner, and write the telescope's right ascension and declination information into the file for Skymap to read.
[0020] In the seventh function, the Windows system function FindWindow is used to obtain the handle of the astronomical telescope control program; a variable of the COPYDATASTRUCT structure is defined, recorded as cpd; in the parameters of the seventh function, the coordinates of the apparent right ascension and declination of the celestial body calculated by Skymap are carried, which are formatted and placed into the lpData of cpd; the Windows system function SendMessage is used to send the Windows system message WM_COPYDATA to the astronomical telescope control program, and cpd is used as the long parameter of the message; the fourth function directly returns true without doing any processing; the fifth function directly returns true without doing any processing;
[0021] In the astronomical telescope control program, add a response to the Windows system message WM_COPYDATA. In the responding program, parse the lpData of the COPYDATASTRUCT structure of the long parameter of the WM_COPYDATA message to obtain the apparent right ascension and declination coordinates of the celestial body sent by Skymap. Then use the automatic pointing and tracking processing algorithm in the astronomical telescope's own control program to control the astronomical telescope to automatically point to and track the celestial body selected in the star map.
[0022] Furthermore, the method uses Skymap to select celestial bodies, and controls the telescope to automatically search for stars and track celestial bodies through the telescope driver interface of Skymap.
[0023] Furthermore, the method is applicable to any computer interface, and suitable interface types include, in addition to RS232 interface, USB interface, TCP / IP network interface, and I / O parallel interface.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] (1) In the Skymap graphical interface, you can directly select celestial bodies, which is very intuitive;
[0026] (2) Skymap is a mature commercial software that has been verified by many users. Its real-time position calculation of celestial bodies is highly accurate and reliable, and it is frequently updated and upgraded. It includes not only stars, but also planets, asteroids, artificial satellites and other celestial bodies. The position of celestial bodies calculated by it can avoid a large number of complex astronomical calculations.
[0027] (3) It is not only suitable for RS232 interface, but also for USB interface, TCP / IP network interface, I / O parallel interface, etc., which expands the interface types of the telescope.
[0028] (4) Directly using Skymap to control the telescope can only realize telescope pointing control and display a crosshair indicating the position of the telescope on the star map, but no other functions. After using the method of the present invention, through a special telescope control program, it is possible to realize the following functions: flexible control of different directions and speeds of the two rotating axes of the telescope, obtaining the position information of the telescope and the target celestial body in the horizontal coordinate system and the equatorial coordinate system, the telescope tracking error, real-time display of sidereal time, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0030] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments.
[0031] This implementation provides a method for controlling an astronomical telescope using Skymap. Figure 1 As shown, the method of the present invention is based on the existing mature commercial software Skymap, and the telescope interface function provided by Skymap includes: a first function, i.e., Dll entry; a second function, i.e., telescope model description; a third function, i.e., the name of each callback function supported by Skymap; a fourth function, i.e., obtaining serial port parameters; a fifth function, i.e., initializing the serial port and connecting the telescope; a sixth function, i.e., obtaining telescope position parameters; a seventh function, i.e., automatically pointing to the selected celestial body; an eighth function, i.e., a telescope synchronization function; a ninth function, i.e., setting the telescope position; and a tenth function, i.e., setting the telescope time.
[0032] The method of the present invention independently compiles a telescope control program, selects a celestial body using Skymap, and controls the telescope to automatically find stars and track celestial bodies through a telescope driving interface of Skymap. The telescope control program and Skymap run on the same computer, and the operating system is any version of Windows.
[0033] Compile a telescope driver for Skymap. In addition to the normal settings of the Skymap driver model:
[0034] In the sixth function, the Position.txt file in the folder where Skymap is located is opened in a shared way. The Position.txt file contains the telescope's current right ascension and declination information written by the telescope program. The right ascension and declination information is read and stored in the sixth function's parameters doubledRA and doubledDec. Skymap will automatically call the sixth function and get the telescope's right ascension and declination from its parameters doubledRA and doubledDec, and display the position the telescope is pointing to with a crosshair on the star map interface.
[0035] In the astronomical telescope control program, the Position.txt file in the folder where Skymap is located is opened in a shared manner at regular intervals (for example, twice per second), and the telescope's right ascension and declination information is written into the file for Skymap to read.
[0036] In the seventh function, the Windows system function FindWindow is used to obtain the handle of the astronomical telescope control program; a variable of the COPYDATASTRUCT structure is defined, recorded as cpd; in the parameters of the seventh function, the coordinates of the apparent right ascension and declination of the celestial body calculated by Skymap are carried, which are formatted and placed into the lpData of cpd; the Windows system function SendMessage is used to send the Windows system message WM_COPYDATA to the astronomical telescope control program, and cpd is used as the long parameter of the message; the fourth function directly returns true without doing any processing; the fifth function directly returns true without doing any processing;
[0037] In the astronomical telescope control program, add a response to the Windows system message WM_COPYDATA. In the responding program, parse the lpData of the COPYDATASTRUCT structure of the long parameter of the WM_COPYDATA message to obtain the apparent right ascension and declination coordinates of the celestial body sent by Skymap. Then use the astronomical telescope control program's own automatic pointing and tracking processing algorithm to control the astronomical telescope to automatically point to and track the celestial body selected in the star map.
[0038] The software operation process is described as follows:
[0039] Skymap and the telescope control program run simultaneously on the same computer;
[0040] Skymap:
[0041] 1. First, select and execute Skymap's "Telescope Menu Bar - Configuration Menu Item", and the sky map will automatically execute "Function (2) Telescope Model Description". In the pop-up window, the telescope models described in all the telescope drivers in the driver folder will be listed. Select the telescope model and RS232 serial port number to be controlled, and click OK;
[0042] 2. Select Skymap's "Telescope Menu Bar - Open Telescope Connection Menu Item" pop-up window. Click OK. Skymap will execute "Function (5) Initialize Serial Port and Connect Telescope". The telescope will be controlled by Skymap.
[0043] 3. Right-click on the celestial body in the Skymap interface. A dialog box pops up. Select "Go to..." to execute. Skymap will execute "Function (7) to automatically point to the selected celestial body". In the function, use the Windows system function FindWindow to obtain the handle of the telescope control program and store it in hWnd. After formatting the parameters of function (7) as "apparent right ascension ** hours ** minutes ** seconds, apparent declination ** degrees ** minutes ** seconds", place them in the variable cpd. Use the Windows system function SendMessage to send the Windows system message WM_COPYDATA to the telescope control program. The variables hWnd and cpd are used as parameters of the message, representing the target window handle to be sent and the parameter information carried, respectively.
[0044] Telescope control program:
[0045] 1. After receiving the Windows system message WM_COPYDATA, parse the parameter cpd of the message to obtain the hours, minutes, seconds of the celestial right ascension and the degrees, minutes, and seconds of the celestial declination, and obtain the right ascension and declination values of the celestial body as the global variables;
[0046] 2. Call the automatic star-finding program to control the telescope to point to the target celestial body;
[0047] 3. After pointing is completed, call the automatic tracking program to keep the telescope pointing to the target celestial body.
[0048] The invention solves the shortcoming that Skymap can only drive telescopes with RS232 interfaces, is applicable to any computer interface telescope, selects celestial bodies by using commercial electronic star map software, and controls the telescope to realize automatic star search and tracking of celestial bodies through the telescope drive interface of the electronic star map.
[0049] The present invention and its embodiments are described schematically above, and the description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by it and designs a structural method and an embodiment similar to the technical solution without creativity without departing from the purpose of the invention, they shall all fall within the protection scope of the present invention.
Claims
1. A method for controlling an astronomical telescope using Skymap, characterized in that: Includes Skymap and a separately compiled astronomical telescope control program running on the same computer as the Skymap; The operating system on the computer is any version of Windows; The telescope interface functions provided by Skymap include: the first function, i.e., Dll entry; the second function, i.e., telescope model description; the third function, i.e., the names of various callback functions supported by Skymap; the fourth function, i.e., obtaining serial port parameters; the fifth function, i.e., initializing the serial port and connecting the telescope; the sixth function, i.e., obtaining telescope position parameters; the seventh function, i.e., automatically pointing to the selected celestial body; the eighth function, i.e., synchronization telescope function; the ninth function, i.e., setting the telescope position; the tenth function, i.e., setting the telescope time; The method comprises: In the sixth function, the Position.txt file in the folder where Skymap is located is opened in a shared way. The Position.txt file contains the current right ascension and declination information of the telescope written by the telescope program. The right ascension and declination information is read and stored in the parameters doubledRA and doubledDec of the sixth function respectively. Skymap automatically calls the sixth function and obtains the right ascension and declination of the telescope from its parameters doubledRA and double dDec, and displays the position pointed by the telescope with a crosshair on the interface of the star map. In the astronomical telescope control program, periodically open the Position.txt file in the folder where Skymap is located in a shared way, and write the telescope's right ascension and declination information into the file for Skymap to read; In the seventh function, the Windows system function FindWindow is used to obtain the handle of the astronomical telescope control program; a variable of the COPYDATASTRUCT structure is defined, recorded as cpd; in the parameters of the seventh function, the coordinates of the apparent right ascension and declination of the celestial body calculated by Skymap are carried, which are formatted and placed into the lpData of cpd; the Windows system function SendMessage is used to send the Windows system message WM_COPYDATA to the astronomical telescope control program, and cpd is used as the long parameter of the message; the fourth function directly returns true without doing any processing; the fifth function directly returns true without doing any processing; In the astronomical telescope control program, add a response to the Windows system message WM_COPYDATA. In the response program, parse the lpData of the COPYDATASTRUCT structure of the long parameter of the WM_COPYDATA message to obtain the apparent right ascension and declination coordinates of the celestial body sent by Skymap, and then use the automatic pointing and tracking processing algorithm in the astronomical telescope's own control program to control the astronomical telescope to automatically point to and track the celestial body selected in the star map.
2. A method for controlling an astronomical telescope using Skymap according to claim 1, characterized in that: Use Skymap to select celestial bodies, and use Skymap's telescope driver interface to control the telescope to automatically find stars and track celestial bodies.
3. The method for controlling an astronomical telescope using Skymap according to claim 1, characterized in that: The method is applicable to any computer interface, and suitable interface types include, in addition to RS232 interface, USB interface, TCP / IP network interface, and I / O parallel interface.
Citation Information
Patent Citations
Intelligent wireless star finding control method
CN108021146A
Method and device for automatically searching and tracking astronomical target by astronomical telescope
CN113360735A