Display control method for driving servo azimuth pitching rotation through pointer dial plate

By drawing the orientation and pitch dial in the user interface of the photoelectric reconnaissance turntable, and controlling the rotation of the servo motor with double-click and scroll wheel, the problem of inability to intuitively display the current position and control accuracy of the servo in the existing technology is solved, and accurate, intuitive and easy-to-operate servo orientation and pitch control are achieved.

CN119717896AActive Publication Date: 2025-03-28南京威翔科技有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411840300.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-28
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

The existing photoelectric reconnaissance turntable control method cannot intuitively display the current position of the servo, the control accuracy is not high, and the operation is complicated.

Method used

By drawing the orientation and pitch dial in the user interface, controlling the rotation of the servo motor with a double-click and a scroll wheel, achieving accurate and intuitive servo orientation and pitch control.

Benefits of technology

It provides accurate, intuitive and easy-to-operate servo orientation and pitch control, improves operating accuracy, reduces misoperation and learning costs, and has a better user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119717896A_ABST
    Figure CN119717896A_ABST
Patent Text Reader

Abstract

The invention discloses a display control method for driving servo azimuth pitching rotation through a pointer dial plate, and belongs to the technical field of photoelectric investigation, and the method comprises the steps: creating an azimuth dial plate interface and a pitching dial plate interface, generating an azimuth and pitching angle command through obtaining a mouse position and roller operation, and then driving a servo motor to act, and the position of the servo motor is displayed on the azimuth dial interface and the pitching dial interface in real time, so that the technical problem of providing accurate, visual and easy-to-operate servo azimuth control and pitching control is solved, and the problems of errors and repeated adjustment in traditional rocker and direction key control are avoided; according to the invention, a user can clearly know the current position of the servo and the target position, misoperation and learning cost are greatly reduced, and compared with a traditional rocker and direction key control mode, the operation precision can be greatly improved, and particularly, the user experience is better when the servo is rapidly and accurately adjusted to a specified angle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of photoelectric detection, and in particular to a display control method for driving servo azimuth pitch rotation through a pointer dial. Background Art

[0002] Photoelectric detection turntables are widely used in important areas such as border control and coastline surveillance. Their main function is to identify and track targets (such as people, vehicles, ships, drones, etc.) through the photoelectric ball they carry. Photoelectric detection turntables are generally composed of a photoelectric ball and a bottom base. The photoelectric ball is connected to the base through a servo slip ring, and is equipped with a visible light lens and an infrared lens. By controlling the servo motor of the indoor display and control terminal, the photoelectric ball can rotate in the range of 0° to 360° in horizontal azimuth and -90° to +90° in pitch, thereby achieving all-round monitoring of the target.

[0003] The existing control methods of photoelectric detection turntable mainly include joystick control and direction key control. Both methods have certain shortcomings:

[0004] The current position of the servo cannot be displayed intuitively: the user cannot clearly and real-time know the current servo position and pitch angle, lacking intuitive feedback.

[0005] Low control accuracy: When using joystick control, the angle adjustment accuracy is low, especially when aiming at the target, multiple fine-tuning is required.

[0006] Complex operation: The operation of the directional key control is complex and easy to confuse, especially when controlling the rotation direction, the clockwise and counterclockwise directions can easily cause confusion to users. Summary of the invention

[0007] The purpose of the present invention is to provide a display control method for driving servo azimuth and pitch rotation by means of a pointer dial, thereby solving the technical problem of providing accurate, intuitive and easy-to-operate servo azimuth and pitch control.

[0008] To achieve the above purpose, the present invention adopts the following technical inventions:

[0009] A display control method for driving servo azimuth and pitch rotation by a pointer dial comprises the following steps:

[0010] Step 1: The user interface module draws an azimuth dial in a square QWidget control. The dial consists of 36 scale points, indicating different azimuth angles. Each scale point is 10° apart. The position relationship is calculated by trigonometric functions. The pointer points to the current angle, and the rotation control is accurate to 1°.

[0011] Draw a pitch dial in the QWidget control, which contains 18 scale points. Each point represents a pitch angle from -90° to +90°. The pointer moves only within the left semicircle.

[0012] Step 2: The control module is used to obtain the control signal sent by the mouse. Specifically, the user double-clicks the target angle on the dial with the mouse to control the servo motor to rotate to the angle. The mouse coordinates are converted into angle values. When double-clicked, a mouse control signal is sent to adjust the servo angle. The mouse wheel is used to finely adjust the azimuth or pitch angle. Each scroll increases or decreases 1°. By rolling forward or backward, an azimuth or pitch control signal is sent to control the servo rotation.

[0013] According to the horizontal control signal and the pitch control signal, the current mouse position or rolling direction is obtained, and the target azimuth or pitch angle is calculated to generate azimuth and pitch angle commands;

[0014] Step 3: The servo motor module reads the azimuth and pitch angle commands in real time and drives the motor to perform corresponding rotation;

[0015] Step 4: The feedback module includes a position sensor, which is used to monitor the current position information of the motor in real time and transmit the data to the control module. The control module updates the pointer position of the dial in real time based on the feedback position information, and displays the current actual angle of the servo motor to the user through the user interface module.

[0016] Preferably, when executing step 1, when drawing the azimuth dial in the interface design, the coordinate position of each scale is calculated by trigonometric functions, and the horizontal angle dial pointer is drawn to point to the current angle; similarly, when drawing the pitch dial, trigonometric functions are used to calculate the scale position corresponding to the pitch angle, and the pitch angle dial pointer is drawn so that it can only rotate within the left semicircle.

[0017] Preferably, when executing step 2, when the user double-clicks, the coordinates of the mouse position are converted into angles, and a horizontal control signal or a pitch control signal for adjusting the servo motor is generated, and the pointer follows the angle change; when the user rolls the mouse wheel, it is determined whether to adjust clockwise or counterclockwise based on the rolling direction, and the adjustment step amount is fixed to 1° to generate an azimuth or pitch control signal.

[0018] Preferably, the position sensor is a rotary encoder or a gyroscope.

[0019] Preferably, the control module receives data input by the user interface module via a network cable, including the mouse position and scroll wheel operation, and sends the generated azimuth and pitch angle commands to the servo motor module via a serial communication interface or a CAN bus interface. The servo motor module generates corresponding PWM signals according to the azimuth and pitch angle commands to control the motor speed or angle control. The feedback module feeds back the real-time monitoring current position information of the motor to the control module via the serial communication interface or the CAN bus interface, and the control module sends it to the user interface module via the network cable. The user interface module displays the feedback current position information of the motor on the azimuth dial or the pitch dial.

[0020] The display control method for driving the servo azimuth and pitch rotation through a pointer dial described in the present invention solves the technical problem of providing accurate, intuitive and easy-to-operate servo azimuth and pitch control. According to the present invention, the user can accurately control the rotation angle of the servo by double-clicking the mouse or sliding the roller, avoiding the errors and repeated adjustment problems in the traditional joystick and direction key control. The azimuth and pitch angles are displayed in real time through the scale of the dial and the rotation of the pointer, so that the user can clearly know the current position of the servo and the target position, and the operation is more intuitive. Double-clicking the mouse and roller control replace the traditional multi-step operation mode. The operation is simple and intuitive, and the misoperation and learning cost are greatly reduced. Compared with the traditional joystick and direction key control mode, the present invention can greatly improve the operation accuracy, especially when it is quickly and accurately adjusted to the specified angle, the user experience is better. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a flow chart of the present invention;

[0022] Figure 2 is a schematic diagram of the azimuth dial interface of the present invention;

[0023] Figure 3 It is a schematic diagram of the pitch dial interface of the present invention. DETAILED DESCRIPTION

[0024] like Figure 1-Figure 3 A display control method for driving servo azimuth and pitch rotation by a pointer dial as shown includes the following steps:

[0025] Step 1: The user interface module draws an azimuth dial in a square QWidget control. The dial consists of 36 scale points, indicating different azimuth angles. Each scale point is 10° apart. The position relationship is calculated by trigonometric functions. The pointer points to the current angle, and the rotation control is accurate to 1°.

[0026] Draw a pitch dial in the QWidget control, which contains 18 scale points. Each point represents a pitch angle from -90° to +90°. The pointer moves only within the left semicircle.

[0027] When drawing the azimuth dial in the interface design, the coordinate position of each scale is calculated by trigonometric functions, and the horizontal angle dial pointer is drawn to point to the current angle; similarly, when drawing the pitch dial, trigonometric functions are used to calculate the scale position corresponding to the pitch angle, and the pitch angle dial pointer is drawn so that it can only rotate within the left semicircle.

[0028] QWidget is used to create and draw dial controls, which are used to control the azimuth and pitch angles of the servo motor. Specifically, QWidget is a container control that is used to contain and display graphical interface components, such as the azimuth dial and pitch dial mentioned in this embodiment.

[0029] Drawing graphics: QWidget can be used to draw custom graphics, such as dials, pointers, etc. In this embodiment, QWidget is used to draw the graphics of the azimuth dial and the pitch dial.

[0030] Processing events: QWidget can receive user input events, such as mouse clicks, mouse movements, wheel scrolling, and other events, and can perform corresponding operations in the event processing function.

[0031] Sub-control management: QWidget can contain other controls (such as buttons, text boxes, etc.) and allow layout management of these controls.

[0032] Control size and position management: Through QWidget, you can set the size and position of the control, and control its display and hiding.

[0033] Drawing callback: You can override the paintEvent method of QWidget to implement custom drawing, such as drawing dial scales, pointers, and other UI elements.

[0034] In this embodiment, the specific orientation dial interface design includes designing an orientation dial, which is composed of a circle consisting of 36 scale points and a dial pointer starting from the center of the circle and pointing to the scale points. The specific steps are as follows:

[0035] Step 1-1: Create a square QWidget control with a size of a. The actual coordinates of the QWidget control take the upper left corner as the coordinate origin (0,0), the horizontal right is the positive direction of the x-axis, and the vertical downward is the positive direction of the y-axis.

[0036] Step 1-2: Draw the center point of the dial with (a / 2, a / 2) as the center of the circle, with 4 pixels.

[0037] Step 1-3: Start drawing scale points from the radius a / 3, just above the center of the circle. The serial number is 0. Each scale point is 10° apart, with a total of 36 scale points. The maximum value of n is 35. The coordinates of the scale points are (a / 2+a / 3×sin(n×10°), a / 2-a / 3×cos(n×10°)), where n is the serial number of the currently drawn scale point.

[0038] Step 1-4: The dial pointer is drawn by drawing two lines with (-1, -1) and (1, 1) as the origin and (0, -a / 3) as the end point, then translating to the position (a / 2, a / 2), and rotating according to the current angle so that the pointer points to the set angle. The initial angle is 0°.

[0039] The specific pitch dial consists of a left semicircle with 18 scale points and a dial pointer starting from the center of the circle and pointing to the scale points. The movement range of the dial pointer is only within the left semicircle area. The specific steps are as follows:

[0040] Step 1-5: Create a square QWidget control with a size of a. The actual coordinates of the QWidget control take the upper left corner as the origin (0,0), the horizontal rightward direction is the positive direction of the x-axis, and the vertical downward direction is the positive direction of the y-axis;

[0041] Step 1-6: Draw the center point of the dial with (a / 2, a / 2) as the center of the circle, with a pixel value of 4. Draw the scale points starting from the radius a / 3 directly below the center of the circle, with the serial number 18, the scale value of -90°, and each scale point increases by 10° upwards, for a total of 18 scale points, with a maximum value of n of 35. The coordinates of the scale points are (a / 2+a / 3×sin(n×10°), a / 2-a / 3×cos(n×10°)), where n is the serial number of the currently drawn scale point.

[0042] Step 1-7: The dial pointer is drawn by drawing two lines with (-1, -1) and (1, 1) as the origin and (0, -a / 3) as the end point, then translating to the position (a / 2, a / 2), and rotating according to the current angle so that the pointer points to the set angle. The initial angle is 270°

[0043] Step 2: The control module is used to obtain the control signal sent by the mouse. Specifically, the user double-clicks the target angle on the dial with the mouse to control the servo motor to rotate to the angle. The mouse coordinates are converted into angle values. When double-clicked, a mouse control signal is sent to adjust the servo angle. The mouse wheel is used to finely adjust the azimuth or pitch angle. Each scroll increases or decreases 1°. By rolling forward or backward, an azimuth or pitch control signal is sent to control the servo rotation.

[0044] According to the horizontal control signal and the pitch control signal, the current mouse position or rolling direction is obtained, and the target azimuth or pitch angle is calculated to generate azimuth and pitch angle commands;

[0045] When the user double-clicks, the coordinates of the mouse position are converted into angles, and a horizontal control signal or a pitch control signal is generated for adjusting the servo motor, and the pointer follows the angle changes; when the user rolls the mouse wheel, it is determined whether to adjust clockwise or counterclockwise based on the rolling direction, and the adjustment step amount is fixed to 1° to generate an azimuth or pitch control signal.

[0046] In this embodiment, the mouse displays the current corresponding azimuth and pitch angle in real time in the dial. The current control coordinates of the mouse need to be converted into the azimuth angle and pitch angle in the corresponding dial according to the center of the circle and the position of the mouse from the center of the circle.

[0047] When the mouse is at the servo azimuth / pitch angle you want to set, double-click the left mouse button to perform the control operation.

[0048] Roll the mouse wheel, each rolling step is 1°. When controlling azimuth, swiping the wheel upward means clockwise rotation; when controlling pitch, swiping the wheel upward means upward rotation.

[0049] Step 3: The servo motor module reads the azimuth and pitch angle commands in real time and drives the motor to perform corresponding rotation;

[0050] In this embodiment, after receiving the azimuth and pitch angle commands, the servo motor module checks whether the current position of the servo motor is consistent with the position indicated by the azimuth and pitch angle commands based on the information fed back by the feedback module. If they are consistent, the servo motor will no longer be driven to move. Otherwise, the servo motor will be driven to move.

[0051] Step 4: The feedback module includes a position sensor, which is used to monitor the current position information of the motor in real time and transmit the data to the control module. The control module updates the pointer position of the dial in real time according to the feedback position information, and displays the current actual angle of the servo motor to the user through the user interface module. The position sensor is a rotary encoder or a gyroscope.

[0052] In this embodiment, the control module receives data input by the user interface module through the network cable, including the mouse position and the scroll wheel operation, and sends the generated azimuth and pitch angle commands to the servo motor module through the serial communication interface or the CAN bus interface. The servo motor module generates corresponding PWM signals according to the azimuth and pitch angle commands to control the motor speed or angle control. The feedback module monitors the current position information of the motor in real time and feeds it back to the control module through the serial communication interface or the CAN bus interface. The control module then sends it to the user interface module through the network cable. The user interface module displays the current position information of the motor on the azimuth dial or the pitch dial according to the feedback.

[0053] The display control method for driving the servo azimuth and pitch rotation through a pointer dial described in the present invention solves the technical problem of providing accurate, intuitive and easy-to-operate servo azimuth and pitch control. According to the present invention, the user can accurately control the rotation angle of the servo by double-clicking the mouse or sliding the roller, avoiding the errors and repeated adjustment problems in the traditional joystick and direction key control. The azimuth and pitch angles are displayed in real time through the scale of the dial and the rotation of the pointer, so that the user can clearly know the current position of the servo and the target position, and the operation is more intuitive. Double-clicking the mouse and roller control replace the traditional multi-step operation mode. The operation is simple and intuitive, and the misoperation and learning cost are greatly reduced. Compared with the traditional joystick and direction key control mode, the present invention can greatly improve the operation accuracy, especially when it is quickly and accurately adjusted to the specified angle, the user experience is better.

Claims

1. A display control method for driving servo azimuth and pitch rotation by a pointer dial, characterized in that: The steps include: Step 1: The user interface module draws an azimuth dial in a square QWidget control. The dial consists of 36 scale points, indicating different azimuth angles. Each scale point is 10° apart. The position relationship between the scale points is calculated by trigonometric functions. The pointer points to the current angle, and the rotation control is accurate to 1°. Similarly, draw a pitch dial in the QWidget control, which contains 18 scale points. Each point represents a pitch angle, from -90° to +90°. The pointer moves only within the left semicircle. Step 2: The control module is used to obtain the control signal sent by the mouse. Specifically, the user double-clicks the target angle on the dial with the mouse to control the servo motor to rotate to the angle. The mouse coordinates are converted into angle values. When double-clicked, a mouse control signal is sent to adjust the servo angle. The mouse wheel is used to finely adjust the azimuth or pitch angle. Each scroll increases or decreases 1°. By rolling forward or backward, an azimuth or pitch control signal is sent to control the servo rotation. According to the horizontal control signal and the pitch control signal, the current mouse position or rolling direction is obtained, and the target azimuth or pitch angle is calculated to generate azimuth and pitch angle commands; Step 3: The servo motor module reads the azimuth and pitch angle commands in real time and drives the motor to perform corresponding rotation; Step 4: The feedback module includes a position sensor, which is used to monitor the current position information of the motor in real time and transmit the data to the control module. The control module updates the pointer position of the dial in real time based on the feedback position information, and displays the current actual angle of the servo motor to the user through the user interface module.

2. A display control method for driving servo azimuth and pitch rotation by a pointer dial as claimed in claim 1, characterized in that: When executing step 1, when drawing the azimuth dial in the interface design, the coordinate position of each scale is calculated by trigonometric functions, and the horizontal angle dial pointer is drawn to point to the current angle; similarly, when drawing the pitch dial, trigonometric functions are used to calculate the scale position corresponding to the pitch angle, and the pitch angle dial pointer is drawn so that it can only rotate within the left semicircle.

3. A display control method for driving servo azimuth and pitch rotation by a pointer dial as claimed in claim 1, characterized in that: When executing step 2, when the user double-clicks, the coordinates of the mouse position are converted into angles, and a horizontal control signal or a pitch control signal for adjusting the servo motor is generated, and the pointer follows the angle change; when the user rolls the mouse wheel, it is determined whether to adjust clockwise or counterclockwise based on the rolling direction, and the adjustment step amount is fixed to 1° to generate an azimuth or pitch control signal.

4. A display control method for driving servo azimuth and pitch rotation by a pointer dial as claimed in claim 1, characterized in that: The position sensor is a rotary encoder or a gyroscope.

5. The display control method for driving the servo azimuth and pitch rotation by a pointer dial as claimed in claim 1, characterized in that: The control module receives data input from the user interface module through the network cable, including the mouse position and scroll wheel operation, and sends the generated azimuth and pitch angle commands to the servo motor module through the serial communication interface or the CAN bus interface. The servo motor module generates corresponding PWM signals according to the azimuth and pitch angle commands to control the motor speed or angle control. The feedback module feeds back the real-time monitoring current position information of the motor to the control module through the serial communication interface or the CAN bus interface, and the control module sends it to the user interface module through the network cable. The user interface module displays the current position information of the motor on the azimuth dial or the pitch dial according to the feedback.

Citation Information

Patent Citations

  • Monitoring system

    CN104184991A

  • Cradle head steering control method and apparatus as well as electronic device and storage medium

    CN108803669A

  • Dynamic deviation correction method and system for lens zoom consistency in automatic tracking mode

    CN113970424A

  • Servo control system for pod

    CN117519307A

  • Imaging apparatus, control method of imaging apparatus and computer program

    JP2020060678A