Telescope attitude angle detection method and system and related equipment
By using accelerometers and magnetometer sensors on the telescope combined with geographic location information, the high cost problem is solved and low-cost and accurate attitude angle detection is achieved.
Patent Information
- Application Number
- CN202510818645.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-26
Smart Images

Figure CN120702450A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of detection technology, and more specifically, to a method, system, and related equipment for detecting the attitude angle of a telescope. Background Art
[0002] With the increasing demand for high-precision telescopes and positioning equipment, real-time measurement of telescope attitude angles (such as roll, pitch, and yaw), as well as automated alignment and tracking of target celestial objects, has become a key technology for improving observation quality. Related technologies use data collected by gyroscopes and inertial measurement units to determine the telescope's attitude angle. However, due to the high cost of gyroscopes and inertial measurement units, the overall cost of measuring telescope attitude angles is high. Summary of the Invention
[0003] In view of the above problems, the embodiments of the present application propose a method, system and related equipment for detecting the attitude angle of a telescope to solve the problem of high implementation cost in the related art of determining the attitude angle of the telescope by using data collected by a gyroscope and an inertial measurement unit.
[0004] In a first aspect, a method for detecting the attitude angle of a telescope is provided, wherein the attitude angle of the telescope includes the roll angle, pitch angle and yaw angle of the telescope; the method comprises: obtaining target acceleration data collected by an acceleration sensor at a target time point, wherein the coordinate system of the acceleration sensor coincides with the coordinate system of the telescope; obtaining target geomagnetic intensity data collected by a magnetometer sensor at the target time point, wherein the coordinate system of the magnetometer sensor coincides with the coordinate system of the magnetometer sensor; determining a target roll angle and a target pitch angle of the telescope at the target time point based on the target acceleration data; determining an estimated yaw angle of the telescope at the target time point based on the target geomagnetic intensity data, the target roll angle of the telescope at the target time point, and the target pitch angle at the target time point; and correcting the estimated yaw angle based on the magnetic declination corresponding to the geographical location of the telescope at the target time point to obtain an actual yaw angle of the telescope at the target time point.
[0005] In a second aspect, a system for detecting the attitude angle of a telescope is provided, comprising: a telescope; an acceleration sensor fixedly mounted on the telescope, wherein the coordinate system of the acceleration sensor coincides with the coordinate system of the telescope; the acceleration sensor is used to collect acceleration data; a magnetometer sensor fixedly mounted on the telescope, wherein the coordinate system of the magnetometer sensor coincides with the coordinate system of the telescope; the magnetometer sensor is used to collect geomagnetic intensity data; and a processor is used to determine the attitude angle of the telescope according to the above method based on the acceleration data collected by the acceleration sensor and the geomagnetic intensity data collected by the magnetometer sensor.
[0006] According to a third aspect, a device for detecting the attitude angle of a telescope is provided, wherein the attitude angle of the telescope includes the roll angle, pitch angle, and yaw angle of the telescope. The device includes: a first acquisition module for acquiring target acceleration data collected by an acceleration sensor at a target time point, wherein the coordinate system of the acceleration sensor coincides with the coordinate system of the telescope; a second acquisition module for acquiring target geomagnetic intensity data collected by a magnetometer sensor at a target time point, wherein the coordinate system of the magnetometer sensor coincides with the coordinate system of the magnetometer sensor; a first determination module for determining a target roll angle and a target pitch angle of the telescope at the target time point based on the target acceleration data; a second determination module for determining an estimated yaw angle of the telescope at the target time point based on the target geomagnetic intensity data, the target roll angle of the telescope at the target time point, and the target pitch angle at the target time point; and a correction module for correcting the estimated yaw angle based on the magnetic declination corresponding to the geographical location of the telescope at the target time point to obtain the actual yaw angle of the telescope at the target time point.
[0007] In a fourth aspect, an electronic device is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the above-mentioned method for detecting the attitude angle of the telescope is implemented.
[0008] In a fifth aspect, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the above-mentioned method for detecting the attitude angle of the telescope is implemented.
[0009] In a sixth aspect, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the above method for detecting the attitude angle of a telescope.
[0010] In this application, target acceleration data collected by an accelerometer fixed to the telescope is used to determine the telescope's target roll angle and target pitch angle at the target time. Combined with target geomagnetic intensity data collected by a magnetometer fixed to the telescope and the determined target roll angle and target pitch angle at the target time, the estimated yaw angle of the telescope at the target time is determined. The estimated yaw angle is then corrected using the magnetic declination corresponding to the telescope's geographic location at the target time to obtain the telescope's actual yaw angle at the target time. This allows the telescope's target roll angle, target pitch angle, and actual yaw angle to be detected using data collected by the accelerometer and magnetometer sensors. Compared to gyroscopes and inertial measurement units, accelerometers and magnetometers are less expensive, thus addressing the high cost of determining the telescope's attitude angle using data collected by gyroscopes and inertial measurement units, enabling low-cost detection of the telescope's attitude angle.
[0011] Moreover, since the coordinate system of the acceleration sensor coincides with the coordinate system of the telescope and the coordinate system of the magnetometer sensor coincides with the coordinate system of the magnetometer sensor, there is no need to perform complex coordinate system transformation on the collected target acceleration data and target geomagnetic intensity data, thereby reducing the processing workload. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0013] Figure 1 This is a flow chart of a method for detecting the attitude angle of a telescope according to an embodiment of the present application.
[0014] Figure 2 FIG. 1 is a flow chart showing step 130 according to an embodiment of the present application.
[0015] Figure 3 FIG. 1 is a flow chart showing step 140 according to an embodiment of the present application.
[0016] Figure 4 2 is a schematic diagram of a display interface of a telescope according to an embodiment of the present application.
[0017] Figure 5 This is a block diagram of a system for detecting the attitude angle of a telescope according to an embodiment of the present application.
[0018] Figure 6 1 is a schematic structural diagram of a telescope according to an embodiment of the present application.
[0019] Figure 7 4 is a block diagram of a device for detecting the attitude angle of a telescope according to an embodiment of the present application.
[0020] Figure 8 is a block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present application.
[0022] In order to enable those skilled in the art to better understand the present invention, the following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0023] In the following description, the terms "first\second" and the like are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0024] The term "plurality" as used herein refers to two or more. "And / or" describes the association relationship between associated objects, indicating that three possible relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship. In the following description, references to "some embodiments or some embodiments" describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
[0025] The following is a detailed description of the implementation details of the technical solution of the embodiment of the present application: Figure 1This is a flow chart of a method for detecting the attitude angle of a telescope according to an embodiment of the present application. The method of the present application can be executed by an electronic device, which can be a telescope or other devices such as a smartphone, and is not specifically limited here. The attitude angle of the telescope includes the roll angle, pitch angle and yaw angle of the telescope. Figure 1 As shown, the method includes: Step 110 , acquiring target acceleration data collected by an acceleration sensor at a target time point; the coordinate system of the acceleration sensor coincides with the coordinate system of the telescope.
[0026] The accelerometer can be fixedly mounted on the telescope. For example, the accelerometer and, as described below, the magnetometer sensor can be fixedly mounted on the telescope's PCBA (Printed Circuit Board Assembly). The accelerometer's coordinate system and the telescope's coordinate system are aligned when the X-axis of the accelerometer's coordinate system is aligned with the X-axis of the telescope's coordinate system, the Y-axis of the accelerometer's coordinate system is aligned with the Y-axis of the telescope's coordinate system, and the Z-axis of the accelerometer's coordinate system is aligned with the Z-axis of the telescope's coordinate system.
[0027] The positive direction of the X-axis of the telescope's coordinate system (also called the body coordinate system) is the direction of the telescope's main axis, the positive direction of its Y-axis is perpendicular to the X-axis and pointing to the right, and the positive direction of the Z-axis is vertically upward. In addition, this application also involves the world coordinate system, where the positive direction of the X-axis of the world coordinate system is the geographic east direction, the positive direction of the Y-axis of the world coordinate system is the geographic north direction, and the positive direction of the Z-axis of the world coordinate system is the vertical downward direction (i.e., the direction of gravity).
[0028] The target time point may be the most recent time point at which acceleration data is collected, or it may be understood that the target time point is the most recent time point at which the attitude angle of the telescope is to be determined. In this application, the acceleration data collected by the acceleration sensor at the target time point is referred to as target acceleration data. In some embodiments, the acceleration sensor may collect acceleration data at equal time intervals according to preset time intervals. The acceleration data collected by the acceleration sensor at any time point includes an X-axis acceleration component, a Y-axis acceleration component, and a Z-axis acceleration component, that is, the acceleration data collected by the acceleration sensor at time point t is .
[0029] Step 120 : acquiring target ground magnetic intensity data collected by the magnetometer sensor at the target time point; the coordinate system of the magnetometer sensor coincides with the coordinate system of the magnetometer sensor.
[0030] A magnetometer sensor, also known as a magnetic sensor or geomagnetic sensor, is used to measure magnetic field strength and direction. For ease of description, the geomagnetic intensity data collected by the magnetometer sensor at a target time point is referred to as target geomagnetic intensity data. Similarly, the coincidence of the magnetometer sensor's coordinate system with the telescope's coordinate system means that the X-axis direction in the magnetometer sensor's coordinate system is the same as the X-axis direction in the telescope's coordinate system, the Y-axis direction in the magnetometer sensor's coordinate system is the same as the Y-axis direction in the telescope's coordinate system, and the Z-axis direction in the magnetometer sensor's coordinate system is the same as the Z-axis direction in the telescope's coordinate system.
[0031] In some embodiments, the magnetometer sensor can collect geomagnetic intensity data at preset time intervals. The time interval for the magnetometer sensor to collect data is equal to the time interval for the acceleration sensor to collect data. The geomagnetic intensity data collected by the magnetometer sensor at any time point includes the X-axis geomagnetic intensity component, the Y-axis geomagnetic intensity component, and the Z-axis geomagnetic intensity component, that is, the geomagnetic intensity data collected by the magnetometer sensor at time point t is equal to the X-axis geomagnetic intensity component. .
[0032] Step 130 : Determine a target roll angle and a target pitch angle of the telescope at a target time point based on the target acceleration data.
[0033] In this application, the roll angle that the telescope trusts to output at a point in time is called the target roll angle of the telescope at that point in time, and the pitch angle that the telescope trusts to output at a point in time is called the target pitch angle of the telescope at that point in time.
[0034] In some embodiments, as Figure 2 As shown, step 130 includes the following steps 210 to 260: Step 210: Obtain the X-axis acceleration component, the Y-axis acceleration component, and the Z-axis acceleration component from the target acceleration data. For example, if the acceleration data collected by the acceleration sensor at the target time point t is , the X-axis acceleration component obtained from it is , the Y-axis acceleration component obtained from it is , the Z-axis acceleration component obtained from it is .
[0035] Step 220 : Perform arctangent processing on the ratio of the Y-axis acceleration component to the Z-axis acceleration component to obtain a candidate roll angle of the telescope at the target time point.
[0036] In some embodiments, if the target time point is t, the candidate roll angle of the telescope at the target time point can be calculated according to the following formula 1: : ;(Formula 1) In some embodiments, if =0, in formula 1, we can It is replaced by a preset value, which may be a value slightly greater than zero, such as 0.001, 0.002, and so on.
[0037] Step 230: Determine a target roll angle of the telescope at the target time point based on the candidate roll angles of the telescope at the target time point.
[0038] In some embodiments, the candidate roll angle of the telescope at the target time point may be used as the target roll angle of the telescope at the target time point.
[0039] In other embodiments, step 230 includes: performing complementary filtering on the target roll angle of the telescope at the previous time point at the target time point and the candidate roll angle of the telescope at the target time point to obtain the target roll angle of the telescope at the target time point.
[0040] For example, if the target time point is t, the target roll angle of the telescope at the target time point t can be calculated according to the following formula 2: : ;(Formula 2) in, represents the target roll angle of the telescope at the previous time point t-1 at the target time point. It is understandable that the target roll angle of the telescope at the previous time point t-1 at the target time point is determined in a similar manner to determining the target roll angle of the telescope at the target time point. is the weight coefficient, which can also be understood as the filter coefficient. ∈[0,1], where Determines the relative importance between the candidate roll angle at the target time point and the target roll angle at the previous time point. If Greater than , indicating that the latest candidate roll angle (i.e., the candidate roll angle at the target time point) is more trusted; if , indicating that the target roll angle at the previous time point is more trusted.
[0041] By weighting the roll angles at different time points, the influence of linear acceleration on the telescope's roll angle determination, caused by the accelerometer's significant influence in dynamic environments, can be reduced. This weighted fusion of candidate roll angles at different time points effectively suppresses noise and improves the accuracy of the determined roll angle. Furthermore, the acceleration data collected by the accelerometer may contain high-frequency noise, and the candidate roll angles calculated at each time point using the original acceleration data may exhibit significant jitter. Weighted fusion can smooth the target roll angles at different time points, providing more stable attitude information.
[0042] Step 240 , calculating the square root of the sum of the squares of the Y-axis acceleration component and the Z-axis acceleration component to obtain a reference value.
[0043] Step 250 : Perform arctangent processing on the inverse of the ratio of the X-axis acceleration component to the reference value to obtain a candidate pitch angle of the telescope at the target time point.
[0044] If the target time point is t, the candidate pitch angle of the telescope at the target time point t can be determined according to the following formula 3: : ;(Formula 3) in, That is the Y-axis acceleration component and the Z-axis acceleration component The square root of the sum of the squares of .
[0045] Step 260: Determine a target pitch angle of the telescope at the target time point based on the candidate pitch angles of the telescope at the target time point.
[0046] In some embodiments, step 260 may include: using the candidate pitch angle of the telescope at the target time point as the target pitch angle of the telescope at the target time point.
[0047] In other embodiments, step 260 includes: performing complementary filtering on the target pitch angle of the telescope at the previous time point at the target time point and the candidate pitch angle of the telescope at the target time point to obtain the target pitch angle of the telescope at the target time point.
[0048] For example, if the target time point is t, the target pitch angle of the telescope at the target time point t can be calculated according to the following formula 4: : ;(Formula 4) in, It refers to the target pitch angle of the telescope at the previous time point t-1 at the target time point. It refers to the candidate pitch angle of the telescope at the target time point t. is the weight coefficient, ∈[0,1], where Determines the relative importance between the candidate pitch angle at the target time point and the target pitch angle at the previous time point. If Greater than , indicating that the latest candidate pitch angle (i.e., the candidate pitch angle at the target time point) is more trusted; if , indicating that the target pitch angle at the previous time point is more trusted. Can be compared with the above The same or different, no specific limitation is given here.
[0049] By weighting the pitch angles at different time points, the influence of linear acceleration on the telescope's pitch angle determination, caused by the accelerometer's significant influence in dynamic environments, can be reduced. This weighted fusion of the pitch angles at different time points effectively suppresses noise and improves the accuracy of the determined pitch angle. Furthermore, the acceleration data collected by the accelerometer may contain high-frequency noise, and the candidate pitch angles calculated at each time point using the original acceleration data may exhibit significant jitter. Weighted fusion can smooth the target pitch angles at different time points, providing more stable attitude information.
[0050] Step 140 , determining an estimated yaw angle of the telescope at the target time point based on the target geomagnetic intensity data, the target roll angle of the telescope at the target time point, and the target pitch angle at the target time point.
[0051] In some embodiments, as Figure 3 As shown, step 140 includes: Step 310, projecting the target geomagnetic intensity data onto the XY axis plane of the world coordinate system based on the target roll angle and the target pitch angle of the telescope at the target time point, and determining the X-axis magnetic field intensity projection component in the world coordinate system and the Y-axis magnetic field intensity projection component in the world coordinate system.
[0052] The influence of gravity is removed by projecting the target geomagnetic intensity data onto the XY plane of the world coordinate system. The X-axis magnetic field intensity projection component in the world coordinate system refers to the projection value of the X-axis magnetic field intensity component of the target geomagnetic intensity data onto the XY plane of the world coordinate system. The Y-axis magnetic field intensity projection component in the world coordinate system refers to the projection value of the Y-axis magnetic field intensity component of the target geomagnetic intensity data onto the XY plane of the world coordinate system.
[0053] In step 310, the target roll angle and the target pitch angle of the telescope at the target time point are used to determine the rotation matrix for transforming the coordinate system of the telescope into the world coordinate system. Based on this rotation matrix, projection is performed to obtain the X-axis magnetic field intensity projection component in the world coordinate system and the Y-axis magnetic field intensity projection component in the world coordinate system. If the target time point is t, the X-axis magnetic field intensity component in the target geomagnetic intensity data is , Y-axis geomagnetic intensity component and the Z-axis geomagnetic intensity component , the X-axis magnetic field intensity projection component in the world coordinate system It can be determined according to the following formula 5: ;(Formula 5) Y-axis magnetic field intensity projection component in the world coordinate system It can be determined according to the following formula 6: ;(Formula 6) Step 320 : Perform arctangent processing on the inverse of the ratio of the Y-axis magnetic field intensity projection component to the X-axis magnetic field intensity projection component to obtain a candidate yaw angle of the telescope at the target time point.
[0054] If the target time point is t, the candidate yaw angle of the telescope at the target time point t can be determined according to the following formula 7: : ;(Formula 7) Step 330 : Determine an estimated yaw angle of the telescope at the target time point based on the candidate yaw angles of the telescope at the target time point.
[0055] In some embodiments, step 330 includes: using the candidate yaw angle of the telescope at the target time point as the estimated yaw angle of the telescope at the target time point.
[0056] In other embodiments, step 330 includes: performing complementary filtering on the estimated yaw angle of the telescope at the previous time point at the target time point and the candidate yaw angle of the telescope at the target time point to obtain the estimated yaw angle of the telescope at the target time point.
[0057] For example, if the target time point is t, the estimated yaw angle of the telescope at the target time point t can be calculated according to the following formula 8: : ;(Formula 8) in, It refers to the estimated yaw angle of the telescope at the previous time point t-1 at the target time point. is the candidate yaw angle of the telescope at the target time point t. is the weight coefficient, ∈[0,1], where Determines the relative importance between the candidate yaw angle at the target time point and the estimated yaw angle at the previous time point. If Greater than , indicating that the latest candidate yaw angle (i.e., the candidate yaw angle at the target time point) is more trusted; if , indicating that the estimated yaw angle at the previous time point is more trusted. Can be compared with the above Same as They are all different and are not specifically limited here.
[0058] By weighting the yaw angles at different time points, this method reduces the impact of linear acceleration on the accelerometer in dynamic environments, effectively suppressing noise and improving the accuracy of the determined yaw angle. Furthermore, the acceleration data collected by the accelerometer may contain high-frequency noise, causing significant jitter in the candidate yaw angles calculated at each time point using the original acceleration data. Weighted fusion can smooth the estimated yaw angles at different time points, providing more stable attitude information.
[0059] Step 150 , correcting the estimated yaw angle according to the magnetic declination corresponding to the geographical location of the telescope at the target time point, to obtain the actual yaw angle of the telescope at the target time point.
[0060] The actual yaw angle of the telescope at the target time point refers to the yaw angle determined by the telescope at the target time point that is trusted and output, and is determined as the actual yaw angle of the telescope at the target time point.
[0061] If the magnetic declination angle corresponding to the geographical location of the telescope at the target time point t , the estimated yaw angle of the telescope at the target time point t can be corrected according to the following formula 9 to obtain the actual yaw angle of the telescope at the target time point t for: ;(Formula 9) In some embodiments, the magnetic declination corresponding to the geographical location of the telescope at the target time point can be obtained by looking up a table based on the latitude and longitude information of the geographical location of the telescope at the target time point. For example, the corresponding magnetic declination can be obtained by querying a map based on the latitude and longitude information and the corresponding time, or by querying a magnetic declination calculator tool.
[0062] In this application, target acceleration data collected by an accelerometer fixed to the telescope is used to determine the telescope's target roll angle and target pitch angle at the target time. Combined with target geomagnetic intensity data collected by a magnetometer fixed to the telescope and the determined target roll angle and target pitch angle at the target time, the estimated yaw angle of the telescope at the target time is determined. The estimated yaw angle is then corrected using the magnetic declination corresponding to the telescope's geographic location at the target time to obtain the telescope's actual yaw angle at the target time. This allows the telescope's target roll angle, target pitch angle, and actual yaw angle to be detected using data collected by the accelerometer and magnetometer sensors. Compared to gyroscopes and inertial measurement units, accelerometers and magnetometers are less expensive, thus addressing the high cost of determining the telescope's attitude angle using data collected by gyroscopes and inertial measurement units, enabling low-cost detection of the telescope's attitude angle.
[0063] Moreover, since the coordinate system of the acceleration sensor coincides with the coordinate system of the telescope and the coordinate system of the magnetometer sensor coincides with the coordinate system of the magnetometer sensor, there is no need to perform complex coordinate system transformation on the collected target acceleration data and target geomagnetic intensity data, thereby reducing the processing workload.
[0064] In some embodiments, after step 150 , the method further includes: displaying an actual yaw angle of the telescope at the target time point, a target roll angle at the target time point, and a target pitch angle at the target time point on a display interface.
[0065] The display interface can be displayed on a display screen of a telescope platform where the telescope is located, by displaying the actual yaw angle of the telescope at the target time point, the target roll angle at the target time point, and the target pitch angle at the target time point.
[0066] Figure 4 is a schematic diagram of a display interface of a telescope according to an embodiment of the present application, such as Figure 4 As shown, the target pitch angle determined by the telescope at the latest time point can be displayed in the pitch angle display area in the display interface, the latest target roll angle of the telescope can be displayed in the display interface, and the latest actual yaw angle of the telescope can be displayed in the yaw angle and compass attitude display area. In addition, the attitude of the compass is also displayed in the yaw angle and compass attitude display area.
[0067] By displaying the telescope's latest yaw angle (actual yaw angle), roll angle (such as the target roll angle at each time point), and pitch angle (such as the target pitch angle at each time point) on the telescope's display interface, the user can promptly know the current latest actual yaw angle, target roll angle, and target pitch angle, thereby facilitating the decision-making process of whether the telescope's attitude needs to be adjusted.
[0068] In some embodiments, after displaying the actual yaw angle of the telescope at the target time point, the target roll angle at the target time point, and the target pitch angle at the target time point on the display interface, the method further includes at least one of the following steps ① and ②: Step ①, according to the actual yaw angle at the target time point, adjust the telescope so that the Y axis in the telescope coordinate system is aligned with the Y axis in the world coordinate system.
[0069] The actual yaw angle of a telescope at a given point in time is equivalent to the angle between the telescope's current positive Y-axis and true north. Since the positive Y-axis in the world coordinate system is true north, aligning the telescope's Y-axis with the world coordinate system means aligning the telescope's positive Y-axis with true north. Therefore, based on the telescope's actual yaw angle at the target time, the telescope is adjusted so that its yaw angle is zero. This ensures that the telescope's Y-axis in the coordinate system is aligned with the world coordinate system's Y-axis.
[0070] In some embodiments, if the telescope platform is provided with an electric drive system for the telescope, the electric drive system can be triggered based on the actual yaw angle of the telescope at the target time point, so that the electric drive system automatically drives the horizontal axis of the telescope to rotate in the opposite direction of the actual yaw angle at the target time point, so that after the rotation, the yaw angle of the telescope is zero.
[0071] In some embodiments, a true north adjustment control may also be displayed on the telescope's display interface. For example, if the actual yaw angle of the telescope at a certain point in time is measured to be non-zero in real time, the true north adjustment control may be displayed. If the user triggers the true north adjustment control, it indicates that the user wishes to align the positive direction of the telescope's Y axis with true north. Therefore, the telescope's electric drive system may drive the telescope's horizontal axis (the horizontal axis of the telescope refers to the rotation axis used to adjust the telescope's yaw angle) in a direction opposite to the current actual yaw angle based on the telescope's current actual yaw angle, so that the positive direction of the telescope's Y axis is aligned with true north after adjustment. In some embodiments, if the user does not trigger the true north adjustment control while the true north adjustment control is displayed, it indicates that the positive direction of the telescope's Y axis does not currently need to be aligned with true north.
[0072] In some embodiments, if the actual yaw angle of the telescope at a certain point in time is measured to be zero in real time, the true north adjustment control is not displayed on the display interface. This is because the actual yaw angle is zero at this point in time, indicating that the positive Y-axis of the telescope is aligned with the true north direction.
[0073] In some embodiments, if the actual yaw angle of the telescope is measured to be zero at a certain point in time, the position information and rotation information of the horizontal axis of the telescope at that time can be stored in the memory. In this way, if a trigger indication is subsequently triggered to adjust the telescope to align with the north direction, the position information and rotation information of the horizontal axis when the actual yaw angle of the telescope is zero stored in the memory can be used as the target position, and the current horizontal axis of the telescope can be controlled to be adjusted to the target position.
[0074] Step ②, according to the target pitch angle at the target time point, adjust the telescope so that the X axis in the coordinate system of the telescope is located in the XY axis plane in the world coordinate system.
[0075] The telescope's pitch angle is the telescope's elevation angle relative to the horizontal plane. The horizontal plane is the XY plane in the world coordinate system. It can be understood that if the telescope's target pitch angle at a certain point in time is not zero, it means that the telescope's X axis is not in the horizontal plane at that time.
[0076] In some embodiments, if the telescope platform is provided with an electric drive system for the telescope, the electric drive system can be triggered based on the target pitch angle of the telescope at the target time point, so that the electric drive system drives the X-axis of the telescope to rotate in the opposite direction of the target pitch angle at the target time point, so that after the rotation, the pitch angle of the telescope is zero, thereby ensuring that the X-axis of the telescope is located in the horizontal plane after the rotation.
[0077] In some embodiments, a horizontal adjustment control may also be displayed on the display interface of the telescope. For example, if the target pitch angle of the telescope at a point in time is measured to be non-zero in real time, the horizontal adjustment control may be displayed. If the user triggers the horizontal adjustment control, it indicates that the user wishes to adjust the X-axis of the telescope so that the X-axis of the telescope is located in a horizontal plane. Therefore, the electric drive system of the telescope may drive the X-axis of the telescope to rotate according to the current target pitch angle of the telescope, so as to adjust it in the opposite direction of the current target pitch angle, so that the pitch angle of the telescope after adjustment is zero.
[0078] In some embodiments, if the user does not activate the horizontal adjustment control while it is displayed, it indicates that the telescope's X-axis does not need to be horizontal. In some embodiments, if the real-time measurement of the telescope's target pitch angle at a certain point in time is zero, the horizontal adjustment control is not displayed on the display interface. This is because the target pitch angle is zero at this point in time, indicating that the telescope's X-axis is horizontal.
[0079] In the above embodiment, the actual yaw angle of the telescope at each point in time can be automatically detected in real time, and the telescope can be adjusted so that the positive direction of the telescope's Y axis points toward true north, thereby automatically aligning the telescope's Y axis with the geographic north direction. Furthermore, the telescope can also be automatically adjusted so that the telescope's X axis is in the horizontal plane based on the target pitch angle of the telescope detected in real time at each point in time, thereby automatically adjusting the telescope's X axis to the horizontal plane.
[0080] This application also provides a system for detecting the attitude angle of a telescope, such as Figure 5 As shown, the telescope attitude angle detection system includes: a telescope 510; an accelerometer 520 fixedly mounted on the telescope, and the coordinate system of the accelerometer coincides with the coordinate system of the telescope; the accelerometer is used to collect acceleration data; a magnetometer sensor 530 fixedly mounted on the telescope, and the coordinate system of the magnetometer sensor coincides with the coordinate system of the telescope; the magnetometer sensor is used to collect geomagnetic intensity data; and a processor 540 is used to determine the attitude angle of the telescope, that is, determine the pitch angle, roll angle, and yaw angle of the telescope at each time point based on the acceleration data collected by the accelerometer and the geomagnetic intensity data collected by the magnetometer sensor according to the method in any of the above embodiments.
[0081] In some embodiments, an accelerometer, a magnetometer sensor, and a processor can be integrated into a telescope. In this case, the telescope can automatically detect its attitude angle according to the method provided in this application. In this case, the telescope itself can serve as a system for detecting the telescope's attitude angle. Furthermore, the telescope's attitude angle can be displayed, the telescope can be automatically aligned with true north, and the telescope can be automatically adjusted to be in the horizontal plane. Figure 6 FIG. 1 is a schematic diagram of the structure of a telescope according to an embodiment of the present application. Figure 6 As shown, the telescope includes an accelerometer sensor, a magnetometer sensor, a processor, and left and right eyepiece screens. Furthermore, the telescope may also include a memory that can store a computer program for implementing the method described in the above embodiments of the present application. The processor executes the computer program stored in the memory to implement the method described in the present application.
[0082] In some embodiments, the accelerometer and magnetometer sensors can communicate with the processor via an I²C bus. For example, acceleration data collected by the accelerometer can be transmitted to the processor via the I²C bus, and geomagnetic intensity data collected by the magnetometer can be transmitted to the processor via the I²C bus. The processor type is not limited to a general-purpose microprocessor (SoC) controller. After determining the telescope's attitude angles (pitch, roll, and yaw) at various points in time, these attitude angles can be synchronized to the telescope's left and right eyepiece screens for graphical display. The user can adjust the telescope's attitude based on its actual yaw angle to keep it level and aligned toward true north.
[0083] In some embodiments, the accelerometer sensor may be a high-performance digital accelerometer that supports ±2g / ±4g / ±8g ranges and has an interrupt output function. The magnetometer sensor may be a high-sensitivity, low-power three-axis magnetometer. Of course, the models of the accelerometer sensor and the magnetometer sensor are not limited and can be selected according to actual needs.
[0084] The solution of this application provides a method for detecting the telescope's attitude angle without relying on gyroscopes and inertial measurement units (IMUs). Compared to gyroscopes and IMUs, accelerometers and magnetometers are lower cost, enabling low-cost attitude angle detection. Therefore, the solution of this application can achieve real-time, low-cost detection of the telescope's attitude angle, provide feedback and display based on the detected attitude angle, and further, automatically adjust the telescope to align it with geographic north and keep its X-axis horizontal. Furthermore, the solution of this application has a simple structure and supports embedded deployment, making it easy to integrate into various telescope platforms. Furthermore, through complementary filtering, noise from the sensors (accelerometer and magnetometer) can be effectively suppressed. The solution of this application is widely applicable to a variety of telescope platforms, for example, in consumer telescopes, astronomical telescopes, outdoor observation equipment, and electronic equipment requiring attitude feedback.
[0085] The following describes an embodiment of the device of the present application, which can be used to perform the method described in the above embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the above method embodiment of the present application.
[0086] Figure 7 is a block diagram of a device for detecting the attitude angle of a telescope according to an embodiment of the present application, wherein the attitude angle of the telescope includes the roll angle, pitch angle and yaw angle of the telescope; Figure 7As shown, the apparatus for detecting the attitude angle of a telescope includes: a first acquisition module 710 for acquiring target acceleration data collected by an acceleration sensor at a target time point, wherein the coordinate system of the acceleration sensor coincides with the coordinate system of the telescope; a second acquisition module 720 for acquiring target geomagnetic intensity data collected by a magnetometer sensor at a target time point, wherein the coordinate system of the magnetometer sensor coincides with the coordinate system of the magnetometer sensor; a first determination module 730 for determining a target roll angle and a target pitch angle of the telescope at the target time point based on the target acceleration data; a second determination module 740 for determining an estimated yaw angle of the telescope at the target time point based on the target geomagnetic intensity data, the target roll angle of the telescope at the target time point, and the target pitch angle at the target time point; and a correction module 750 for correcting the estimated yaw angle based on the magnetic declination corresponding to the geographical location of the telescope at the target time point to obtain an actual yaw angle of the telescope at the target time point.
[0087] In some embodiments, the second determination module 740 includes: a projection unit, used to project the target geomagnetic intensity data onto the XY axis plane of the world coordinate system according to the target roll angle and the target pitch angle of the telescope at the target time point, and determine the X-axis magnetic field intensity projection component in the world coordinate system and the Y-axis magnetic field intensity projection component in the world coordinate system; a first inverse tangent processing unit, used to perform inverse tangent processing on the inverse of the ratio of the Y-axis magnetic field intensity projection component to the X-axis magnetic field intensity projection component, to obtain a candidate yaw angle of the telescope at the target time point; and an estimated yaw angle determination unit, used to determine the estimated yaw angle of the telescope at the target time point according to the candidate yaw angle of the telescope at the target time point.
[0088] In some embodiments, the estimated yaw angle determination unit is configured to: use the candidate yaw angle of the telescope at the target time point as the estimated yaw angle of the telescope at the target time point; or perform complementary filtering processing on the estimated yaw angle of the telescope at the previous time point of the target time point and the candidate yaw angle of the telescope at the target time point to obtain the estimated yaw angle of the telescope at the target time point.
[0089] In some embodiments, the first determination module 730 includes: a first acquisition unit, configured to acquire an X-axis acceleration component, a Y-axis acceleration component, and a Z-axis acceleration component from the target acceleration data; a second inverse tangent processing unit, configured to perform inverse tangent processing on the ratio of the Y-axis acceleration component to the Z-axis acceleration component to obtain a candidate roll angle of the telescope at the target time point; a target roll angle determination unit, configured to determine a target roll angle of the telescope at the target time point based on the candidate roll angle of the telescope at the target time point; a reference value determination unit, configured to calculate the square root of the sum of the squares of the Y-axis acceleration component and the Z-axis acceleration component to obtain a reference value; a third inverse tangent processing unit, configured to perform inverse tangent processing on the inverse of the ratio of the X-axis acceleration component to the reference value to obtain a candidate pitch angle of the telescope at the target time point; and a target pitch angle determination unit, configured to determine the target pitch angle of the telescope at the target time point based on the candidate pitch angle of the telescope at the target time point.
[0090] In some embodiments, the target roll angle determination unit is configured to: use the candidate roll angle of the telescope at the target time point as the target roll angle of the telescope at the target time point; or perform complementary filtering on the target roll angle of the telescope at the previous time point and the candidate roll angle of the telescope at the target time point to obtain the target roll angle of the telescope at the target time point; Correspondingly, the target pitch angle determination unit is configured to: use the candidate pitch angle of the telescope at the target time point as the target pitch angle of the telescope at the target time point; or perform complementary filtering processing on the target pitch angle of the telescope at the previous time point and the candidate pitch angle of the telescope at the target time point to obtain the target pitch angle of the telescope at the target time point.
[0091] In some embodiments, the apparatus for detecting the attitude angle of the telescope further includes: a display module for displaying the actual yaw angle, the target roll angle, and the target pitch angle of the telescope at the target time point in a display interface.
[0092] In some embodiments, the device for detecting the attitude angle of the telescope further includes at least one of a first adjustment module and a second adjustment module: the first adjustment module is used to adjust the telescope according to the actual yaw angle at the target time point so that the Y axis in the coordinate system of the telescope is aligned with the Y axis in the world coordinate system; the second adjustment module is used to adjust the telescope according to the target pitch angle at the target time point so that the X axis in the coordinate system of the telescope is located in the XY axis plane in the world coordinate system.
[0093] Figure 8This is a block diagram of an electronic device according to an embodiment of the present application. The electronic device may include a processor 810 and a memory 820. The memory 820 stores computer-readable instructions. When executed by the processor 810, the computer-readable instructions implement any of the above-described method embodiments. In some embodiments, if the electronic device is a telescope, the electronic device may also include functional components of the telescope itself. Furthermore, the electronic device may also integrate an accelerometer and a magnetometer sensor.
[0094] The processor 810 may include one or more processing cores. The processor 810 utilizes various interfaces and circuits to connect various components within the electronic device. It executes instructions, programs, code sets, or instruction sets stored in the memory 820, as well as accesses data stored in the memory 820, to perform various functions and process data within the electronic device. Optionally, the processor 810 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 810 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem handles wireless communications. It is understood that the modem may also be implemented independently of the processor 810 via a separate communications chip.
[0095] The memory 820 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 820 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, and the like. The data storage area may also store data created by the electronic device during use.
[0096] The present application also provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor, the method in any of the above method embodiments is implemented.
[0097] The computer-readable storage medium may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Alternatively, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium has storage space for computer-readable instructions for executing any of the method steps described above. These computer-readable instructions can be read from or written to one or more computer program products. The computer-readable instructions may be compressed, for example, in a suitable format.
[0098] According to one aspect of an embodiment of the present application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method of any of the above embodiments.
[0099] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the application, the features and functions of two or more modules or units described above can be concretized in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0100] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable an electronic device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
[0101] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in this application. It should be understood that this application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of this application is limited only by the appended claims.
Claims
1. A method for detecting the attitude angle of a telescope, characterized in that: The attitude angle of the telescope includes the roll angle, pitch angle and yaw angle of the telescope; the method comprises: Acquiring target acceleration data collected by an acceleration sensor at a target time point; the coordinate system of the acceleration sensor coincides with the coordinate system of the telescope; acquiring target ground magnetic intensity data collected by a magnetometer sensor at a target time point; wherein the coordinate system of the magnetometer sensor coincides with the coordinate system of the magnetometer sensor; determining a target roll angle and a target pitch angle of the telescope at the target time point according to the target acceleration data; determining an estimated yaw angle of the telescope at the target time point based on the target geomagnetic intensity data, a target roll angle of the telescope at the target time point, and a target pitch angle at the target time point; The estimated yaw angle is corrected according to the magnetic declination corresponding to the geographical location of the telescope at the target time point to obtain the actual yaw angle of the telescope at the target time point.
2. The method according to claim 1, characterized in that Determining an estimated yaw angle of the telescope at the target time point based on the target geomagnetic intensity data, a target roll angle of the telescope at the target time point, and a target pitch angle at the target time point includes: projecting the target geomagnetic intensity data onto an XY-axis plane of a world coordinate system according to a target roll angle and a target pitch angle of the telescope at the target time point, and determining an X-axis magnetic field intensity projection component in the world coordinate system and a Y-axis magnetic field intensity projection component in the world coordinate system; Performing an inverse tangent process on the inverse of the ratio of the Y-axis magnetic field intensity projection component to the X-axis magnetic field intensity projection component to obtain a candidate yaw angle of the telescope at the target time point; An estimated yaw angle of the telescope at the target time point is determined based on the candidate yaw angles of the telescope at the target time point.
3. The method according to claim 2, characterized in that Determining the estimated yaw angle of the telescope at the target time point based on the candidate yaw angle of the telescope at the target time point includes: Using the candidate yaw angle of the telescope at the target time point as the estimated yaw angle of the telescope at the target time point; or Complementary filtering is performed on the estimated yaw angle of the telescope at a previous time point of the target time point and the candidate yaw angle of the telescope at the target time point to obtain the estimated yaw angle of the telescope at the target time point.
4. The method according to claim 1, wherein Determining a target roll angle and a target pitch angle of the telescope at the target time point based on the target acceleration data includes: Obtaining an X-axis acceleration component, a Y-axis acceleration component, and a Z-axis acceleration component from the target acceleration data; Performing arctangent processing on the ratio of the Y-axis acceleration component to the Z-axis acceleration component to obtain a candidate roll angle of the telescope at the target time point; determining a target roll angle of the telescope at the target time point based on the candidate roll angles of the telescope at the target time point; Calculating the square root of the sum of the squares of the Y-axis acceleration component and the Z-axis acceleration component to obtain a reference value; Performing arc tangent processing on the inverse of the ratio of the X-axis acceleration component to the reference value to obtain a candidate pitch angle of the telescope at the target time point; A target pitch angle of the telescope at the target time point is determined according to the candidate pitch angles of the telescope at the target time point.
5. The method according to claim 4, characterized in that Determining the target roll angle of the telescope at the target time point based on the candidate roll angle of the telescope at the target time point includes any one of the following: using the candidate roll angle of the telescope at the target time point as the target roll angle of the telescope at the target time point; Performing complementary filtering on the target roll angle of the telescope at the previous time point of the target time point and the candidate roll angle of the telescope at the target time point to obtain the target roll angle of the telescope at the target time point; Correspondingly, determining the target pitch angle of the telescope at the target time point based on the candidate pitch angle of the telescope at the target time point includes any one of the following: using the candidate pitch angle of the telescope at the target time point as the target pitch angle of the telescope at the target time point; Complementary filtering is performed on the target pitch angle of the telescope at a previous time point of the target time point and the candidate pitch angle of the telescope at the target time point to obtain the target pitch angle of the telescope at the target time point.
6. The method according to any one of claims 1 to 5, characterized in that After correcting the estimated yaw angle based on the magnetic declination corresponding to the geographical location of the telescope at the target time point to obtain the actual yaw angle of the telescope at the target time point, the method further includes: The actual yaw angle of the telescope at the target time point, the target roll angle at the target time point, and the target pitch angle at the target time point are displayed on a display interface.
7. The method according to claim 6, characterized in that After displaying the actual yaw angle of the telescope at the target time point, the target roll angle at the target time point, and the target pitch angle at the target time point on the display interface, the method further includes at least one of the following: adjusting the telescope according to the actual yaw angle at the target time point so that the Y axis in the coordinate system of the telescope is aligned with the Y axis in the world coordinate system; According to the target pitch angle at the target time point, the telescope is adjusted so that the X axis in the coordinate system of the telescope is located in the XY axis plane in the world coordinate system.
8. A system for detecting the attitude angle of a telescope, characterized in that: include: telescope; an acceleration sensor fixedly mounted on the telescope, wherein the coordinate system of the acceleration sensor coincides with the coordinate system of the telescope; The acceleration sensor is used to collect acceleration data; a magnetometer sensor fixedly mounted on the telescope, wherein the coordinate system of the magnetometer sensor coincides with the coordinate system of the telescope; the magnetometer sensor is used to collect geomagnetic intensity data; A processor is configured to determine the attitude angle of the telescope according to the method according to any one of claims 1 to 7 based on the acceleration data collected by the acceleration sensor and the geomagnetic intensity data collected by the magnetometer sensor.
9. A device for detecting the attitude angle of a telescope, characterized in that: The attitude angle of the telescope includes the roll angle, pitch angle and yaw angle of the telescope; the device includes: A first acquisition module is configured to acquire target acceleration data collected by an acceleration sensor at a target time point; the coordinate system of the acceleration sensor coincides with the coordinate system of the telescope; a second acquisition module, configured to acquire target geomagnetic intensity data collected by a magnetometer sensor at a target time point; wherein the coordinate system of the magnetometer sensor coincides with the coordinate system of the magnetometer sensor; a first determining module, configured to determine a target roll angle and a target pitch angle of the telescope at the target time point based on the target acceleration data; a second determining module, configured to determine an estimated yaw angle of the telescope at the target time point based on the target geomagnetic intensity data, a target roll angle of the telescope at the target time point, and a target pitch angle at the target time point; The correction module is used to correct the estimated yaw angle according to the magnetic declination corresponding to the geographical location of the telescope at the target time point to obtain the actual yaw angle of the telescope at the target time point.
10. An electronic device, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.