CN117234987A - Universal method for generating double-path navigation serial data - Google Patents

Universal method for generating double-path navigation serial data Download PDF

Info

Publication number
CN117234987A
CN117234987A CN202311168091.5A CN202311168091A CN117234987A CN 117234987 A CN117234987 A CN 117234987A CN 202311168091 A CN202311168091 A CN 202311168091A CN 117234987 A CN117234987 A CN 117234987A
Authority
CN
China
Prior art keywords
navigation data
group
navigation
class
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311168091.5A
Other languages
Chinese (zh)
Inventor
潘雁鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Jinhang Computing Technology Research Institute
Original Assignee
Tianjin Jinhang Computing Technology Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Jinhang Computing Technology Research Institute filed Critical Tianjin Jinhang Computing Technology Research Institute
Priority to CN202311168091.5A priority Critical patent/CN117234987A/en
Publication of CN117234987A publication Critical patent/CN117234987A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a universal method for generating double-channel navigation serial port data, and belongs to the technical field of serial ports. The universal method for generating the two-way navigation serial data can generate the two-way navigation data with higher precision, and can conveniently change navigation parameters without modifying and burning a development board program, so that various forms of two-way navigation data can be generated in a simulation mode.

Description

Universal method for generating double-path navigation serial data
Technical Field
The invention belongs to the technical field of serial ports, and particularly relates to a universal method for generating two-way navigation serial port data.
Background
In order to improve the stability and reliability of the operation of the inertial navigation system on the ship, the inertial navigation system generally transmits two sets of identical navigation data outwards through a serial interface. Each group of navigation consists of synchronous pulse signals, one type of navigation and two types of navigation. In order to verify the performance of a navigation data receiving device, a device capable of transmitting such serial navigation data is often required, and it is not practical to select a real inertial navigation system and it is not convenient to verify the boundary value of the navigation data. There is therefore a need for a serial two-way navigation simulator that is readily available and that allows for easy modification of navigation parameters. In the prior art, a portable windows computer is externally connected with a serial port docking station to run a simulated navigation data transmission program. However, due to the background overhead of windows systems, timers are often inaccurate, the requirements for test accuracy cannot be met, and the external serial port docking station of the portable computer is still relatively heavy.
Disclosure of Invention
First, the technical problem to be solved
The invention aims to solve the technical problems that: the universal method for generating the two-way navigation serial data not only can generate the two-way navigation data with higher precision, but also can conveniently change navigation parameters without modifying and burning the development board program, so that the two-way navigation data in various forms can be simulated and generated.
(II) technical scheme
In order to solve the technical problems, the invention provides a general method for generating two-way navigation serial data, which comprises the following steps:
(1) Initializing two timers, two GPIO pins and five serial ports;
(2) Based on the initialized two timers, the two GPIO pins and the four serial ports, sending two groups of navigation data according to an initial time sequence and an initial navigation value;
(3) And the fifth serial port receives the command of the upper computer in real time and changes the corresponding navigation parameters according to the command content.
Preferably, the specific method of the step (1) is that a first timer, a second timer, GPIOA1 and GPIOA2 are initialized; the first timer and the GPIOA1 are used for generating a first group of synchronous pulse signals; the second timer and the GPIOA2 are used for generating a second group of synchronous pulse signals; the first serial port generates a first group of navigation data, and the second serial port generates a first group of navigation data; the third serial port generates a second group of navigation data, and the fourth serial port generates a second group of navigation data; the fifth serial port is used for receiving the command of the upper computer, analyzing the command content and changing the corresponding parameters.
Preferably, each group of synchronous pulse signals are square wave signals, the duty ratio is 1:1, the initial frequency value is 40hz, and the signals are recorded as pulseFre; the initial value of the navigation data is navi1, and the navigation data periodically changes in the vicinity of navi 1; the initial value of the class II navigation data is navi2, and the class II navigation data is periodically changed in the vicinity of navi 2.
Preferably, the specific method in the step (2) is that after the first timer generates an interrupt, the level value of the GPIO1 is set in the interrupt processing function to simulate and generate the first synchronous pulse signal; then, a first group of navigation data is sent through a first serial port, and then, a first group of navigation data is sent through a second serial port; finally, changing the values of the first-class navigation data and the second-class navigation data, and transmitting the first-class navigation data and the second-class navigation data in the next period, wherein the first-group navigation data comprises a first synchronous pulse signal, the first-group navigation data and the first-group second-class navigation data; setting the level value of GPIO2 in the interrupt processing function to simulate and generate a second synchronous pulse signal after the second timer generates the interrupt; then, the second group of the first-class navigation data is sent through a third serial port, and then the second group of the second-class navigation data is sent through a fourth serial port; finally, changing the values of the first-class navigation data and the second-class navigation data, and transmitting the second-class navigation data and the second-class navigation data in the next period, wherein the second-group navigation data comprises a second synchronous pulse signal, the second-group navigation data and the second-group navigation data; both sets of navigation data are generated using the stm32f103 development board.
Preferably, in each set of navigation data, the falling edge of the synchronous pulse signal is used as a trigger mark for transmitting one type of navigation data; each group of synchronous pulse signals are square wave signals, the duty ratio is 1:1, the frequency initial value is 40hz, and the signals are recorded as pulseFre; the initial value of the navigation data of one type is navi1, and the navigation data of one type is periodically changed in the vicinity of navi 1. The initial value of the class II navigation data is navi2, and the class II navigation data is periodically changed in the vicinity of navi 2.
Preferably, both pulseFre, navi, navi2 are configurable.
Preferably, in the step (3), the control command of the upper computer received in real time by the fifth serial port can implement configuration of the navigation parameters to simulate various types of two-way navigation.
Preferably, the control command of the upper computer is designed as the following table, wherein datalen represents the length of the data of the present packet, and data represents the effective parameter data of the present packet:
the invention also provides a system for implementing the method.
The invention also provides application of the method in an inertial navigation system on a ship.
The invention also provides application of the system in an inertial navigation system on a ship.
(III) beneficial effects
1. By formulating a corresponding control protocol, the parameters such as pulse width, navigation data and the like can be changed without re-writing and burning the development board program, so that the navigation data generated by the serial port can meet the universality.
2. The stm32f103 development board is used to enable the accuracy of the navigation data transmission time sequence generated by the serial port to be closer to an inertial navigation system than that of a Windows system, and the test requirement under high accuracy can be met.
Drawings
FIG. 1 is a schematic diagram of a two-way navigation data transmission of the present invention;
FIG. 2 is a schematic diagram of a serial port generated dual-path navigation data according to the present invention.
Detailed Description
To make the objects, contents and advantages of the present invention more apparent, the following detailed description of the present invention will be given with reference to the accompanying drawings and examples.
The invention provides a method for generating synchronous pulse, first-class navigation data and second-class navigation data by utilizing a stm32f103 development board, and corresponding control protocols are formulated so that parameters such as pulse width, navigation data and the like can be conveniently changed without re-writing and burning the development board program. The universal method for generating the two-way navigation serial data can generate the two-way navigation data with higher precision, and can conveniently change navigation parameters without modifying and burning a development board program, so that various forms of two-way navigation data can be generated in a simulation mode.
Referring to fig. 1 and 2, the specific steps are as follows:
(1) Initializing two timers, two GPIO pins and five serial ports;
(2) Based on the initialized two timers, the two GPIO pins and the four serial ports, sending two groups of navigation data according to an initial time sequence and an initial navigation value;
(3) And the fifth serial port receives the command of the upper computer in real time and changes the corresponding navigation parameters according to the command content.
Initializing a first timer, a second timer, GPIOA1 and GPIOA2; the first timer and the GPIOA1 are used for generating a first group of synchronous pulse signals; the second timer and the GPIOA2 are used for generating a second group of synchronous pulse signals; the first serial port generates a first group of navigation data, and the second serial port generates a first group of navigation data; the third serial port generates a second group of navigation data, and the fourth serial port generates a second group of navigation data; the fifth serial port is used for receiving the command of the upper computer, analyzing the command content and changing the corresponding parameters.
Each group of synchronous pulse signals are square wave signals, the duty ratio is 1:1, the frequency initial value is 40hz, and the signals are recorded as pulseFre; the initial value of the navigation data is navi1, and the navigation data periodically changes in the vicinity of navi 1; the initial value of the class II navigation data is navi2, and the class II navigation data is periodically changed in the vicinity of navi 2. The change of the timer period can simulate the generation of synchronous pulse signals with different frequencies. The change of the initial value of the navigation data can conveniently verify the boundary value of the navigation data, and has important significance for verifying the navigation receiving processing equipment.
The specific method of the step (2) is that after the first timer generates an interrupt, the level value of GPIO1 is set in an interrupt processing function to simulate and generate a first synchronous pulse signal; then, a first group of navigation data is sent through a first serial port, and then, a first group of navigation data is sent through a second serial port; and finally, changing the values of the first-class navigation data and the second-class navigation data so as to transmit the first-class navigation data and the second-class navigation data in the next period, wherein the first-group navigation data comprises a first synchronous pulse signal, the first-group navigation data and the first-group second-class navigation data. Setting the level value of GPIO2 in the interrupt processing function to simulate and generate a second synchronous pulse signal after the second timer generates the interrupt; then, the second group of the first-class navigation data is sent through a third serial port, and then the second group of the second-class navigation data is sent through a fourth serial port; and finally, changing the values of the first-class navigation data and the second-class navigation data so as to transmit the second-class navigation data and the second-class navigation data in the next period, wherein the second-group navigation data comprises a second synchronous pulse signal, the second-group first-class navigation data and the second-group second-class navigation data. Both sets of navigation data are generated using the stm32f103 development board.
In each group of navigation data, the falling edge of the synchronous pulse signal is used as a trigger mark for transmitting one type of navigation data. Each group of synchronous pulse signals is a square wave signal, the duty ratio is 1:1, the initial frequency value is 40hz, and the synchronous pulse signals are marked as pulseFre. The initial value of the navigation data of one type is navi1, and the navigation data of one type is periodically changed in the vicinity of navi 1. The initial value of the class II navigation data is navi2, and the class II navigation data is periodically changed in the vicinity of navi 2. pulseFre, navi1, navi2 can be configured.
In the step (3), the command of the upper computer received by the fifth serial port in real time can realize configuration of navigation parameters to simulate various types of double-way navigation, so that the universality of a double-way navigation method generated by the serial port is improved, and the control command is shown in the following table, wherein datalen represents the length of the package data, and data represents the effective parameter data of the package data:
it can be seen that the invention provides a simple and convenient two-way navigation data generation method, the accuracy of the generated navigation data transmission time sequence is more close to the inertial navigation system, and the test requirement can be met. By formulating a corresponding control protocol, the parameters such as pulse width, navigation data and the like can be changed without re-writing and burning the development board program, so that the navigation data generated by the serial port can meet the universality.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and variations could be made by those skilled in the art without departing from the technical principles of the present invention, and such modifications and variations should also be regarded as being within the scope of the invention.

Claims (11)

1. The universal method for generating the two-way navigation serial data is characterized by comprising the following steps of:
(1) Initializing two timers, two GPIO pins and five serial ports;
(2) Based on the initialized two timers, the two GPIO pins and the four serial ports, sending two groups of navigation data according to an initial time sequence and an initial navigation value;
(3) And the fifth serial port receives the command of the upper computer in real time and changes the corresponding navigation parameters according to the command content.
2. The method of claim 1, wherein step (1) is specifically performed by initializing a first timer, a second timer, gpio a1, gpio a2; the first timer and the GPIOA1 are used for generating a first group of synchronous pulse signals; the second timer and the GPIOA2 are used for generating a second group of synchronous pulse signals; the first serial port generates a first group of navigation data, and the second serial port generates a first group of navigation data; the third serial port generates a second group of navigation data, and the fourth serial port generates a second group of navigation data; the fifth serial port is used for receiving the command of the upper computer, analyzing the command content and changing the corresponding parameters.
3. The method of claim 1 wherein each set of synchronization pulse signals is a square wave signal having a duty cycle of 1:1 and a frequency initial value of 40hz, denoted pulseFre; the initial value of the navigation data is navi1, and the navigation data periodically changes in the vicinity of navi 1; the initial value of the class II navigation data is navi2, and the class II navigation data is periodically changed in the vicinity of navi 2.
4. The method of claim 1, wherein step (2) is specifically performed by setting a level value of GPIO1 in an interrupt processing function to simulate generation of the first synchronization pulse signal after the first timer generates the interrupt; then, a first group of navigation data is sent through a first serial port, and then, a first group of navigation data is sent through a second serial port; finally, changing the values of the first-class navigation data and the second-class navigation data, and transmitting the first-class navigation data and the second-class navigation data in the next period, wherein the first-group navigation data comprises a first synchronous pulse signal, the first-group navigation data and the first-group second-class navigation data; setting the level value of GPIO2 in the interrupt processing function to simulate and generate a second synchronous pulse signal after the second timer generates the interrupt; then, the second group of the first-class navigation data is sent through a third serial port, and then the second group of the second-class navigation data is sent through a fourth serial port; finally, changing the values of the first-class navigation data and the second-class navigation data, and transmitting the second-class navigation data and the second-class navigation data in the next period, wherein the second-group navigation data comprises a second synchronous pulse signal, the second-group navigation data and the second-group navigation data; both sets of navigation data are generated using the stm32f103 development board.
5. The method of claim 4, wherein a falling edge of the synchronization pulse signal is used as a trigger for transmitting a type of navigation data transmission in each set of navigation data; each group of synchronous pulse signals are square wave signals, the duty ratio is 1:1, the frequency initial value is 40hz, and the signals are recorded as pulseFre; the initial value of the navigation data of one type is navi1, and the navigation data of one type is periodically changed in the vicinity of navi 1. The initial value of the class II navigation data is navi2, and the class II navigation data is periodically changed in the vicinity of navi 2.
6. The method of claim 5, wherein pulseFre, navi, navi2 are each configurable.
7. The method of claim 3, wherein in step (3), the control command of the host computer received in real time by the fifth serial port can implement configuration of navigation parameters to simulate various types of two-way navigation.
8. The method of claim 7, wherein the control command of the host computer is designed as the following table, wherein datalen represents a length of the present packet data, and data represents valid parameter data of the present packet data:
9. a system for implementing the method of any one of claims 1 to 8.
10. Use of the method of any one of claims 1 to 8 in an inertial navigation system onboard a ship.
11. Use of the system of claim 9 in an inertial navigation system on a ship.
CN202311168091.5A 2023-09-12 2023-09-12 Universal method for generating double-path navigation serial data Pending CN117234987A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311168091.5A CN117234987A (en) 2023-09-12 2023-09-12 Universal method for generating double-path navigation serial data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311168091.5A CN117234987A (en) 2023-09-12 2023-09-12 Universal method for generating double-path navigation serial data

Publications (1)

Publication Number Publication Date
CN117234987A true CN117234987A (en) 2023-12-15

Family

ID=89092340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311168091.5A Pending CN117234987A (en) 2023-09-12 2023-09-12 Universal method for generating double-path navigation serial data

Country Status (1)

Country Link
CN (1) CN117234987A (en)

Similar Documents

Publication Publication Date Title
CN104750588A (en) Serial port communication based pressure testing method
CN103685103A (en) Integral verification platform based on FPGA communication base bands
US20050097403A1 (en) USB interface and testing method thereof
CN109828872A (en) Signal-testing apparatus and method
CN111008102A (en) FPGA accelerator card high-speed interface SI test control device, system and method
CN112579495B (en) GPIO controller
CN104836636A (en) Method, device and system for communication based on novel CAN frame
CN117234987A (en) Universal method for generating double-path navigation serial data
Cao et al. Working principle and application analysis of UART
CN117906638A (en) Universal system for generating double-path navigation serial data
CN111123222B (en) FPGA-based highway vehicle multi-array element radar echo simulator and implementation method
CN105808476A (en) Cross-clock-domain data transmission method and device
EP1532534B1 (en) Universal approach for simulating, emulating, and testing a variety of serial bus types
CN107943625A (en) A kind of MCU test methods for simulating various communication interfaces
US20050262184A1 (en) Method and apparatus for interactively training links in a lockstep fashion
CN113986600B (en) Test method and device for chip serial interface and chip
US11599495B2 (en) Device for performing communication and computing system including the same
CN113422756B (en) Verification data transmission method, rate conversion device and verification data transmission system
CN109672482A (en) Radio frequency module testing method, device, equipment and storage medium
US11748289B2 (en) Protocol aware bridge circuit for low latency communication among integrated circuits
CN113535614B (en) Communication system for decoding BISS-C protocol
Talledo Design and implementation of an ethernet frame analyzer for high speed networks
CN104200033A (en) High-speed circuit board serial port debugging method based on FPGA and DSP
CN110825681B (en) LBE bus-based SMHK381 test method
CN109739695B (en) ARM and FPGA dissimilar redundancy communication method in unmanned aerial vehicle controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination