CN108959114A - A kind of sonar contact data recording equipment and recording method - Google Patents

A kind of sonar contact data recording equipment and recording method Download PDF

Info

Publication number
CN108959114A
CN108959114A CN201810491989.9A CN201810491989A CN108959114A CN 108959114 A CN108959114 A CN 108959114A CN 201810491989 A CN201810491989 A CN 201810491989A CN 108959114 A CN108959114 A CN 108959114A
Authority
CN
China
Prior art keywords
data
time
file
buffer area
information
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.)
Granted
Application number
CN201810491989.9A
Other languages
Chinese (zh)
Other versions
CN108959114B (en
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.)
Changsha Golden Sin Defense Technology Co Ltd
Original Assignee
Changsha Golden Sin Defense Technology Co Ltd
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 Changsha Golden Sin Defense Technology Co Ltd filed Critical Changsha Golden Sin Defense Technology Co Ltd
Priority to CN201810491989.9A priority Critical patent/CN108959114B/en
Publication of CN108959114A publication Critical patent/CN108959114A/en
Application granted granted Critical
Publication of CN108959114B publication Critical patent/CN108959114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S15/00Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems
    • G01S15/88Sonar systems specially adapted for specific applications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • General Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Measurement Of Velocity Or Position Using Acoustic Or Ultrasonic Waves (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A kind of sonar contact data recording equipment and recording method, including STM32 chip;USART module, SPI module, the memory module with SD card and the USB OTG FS module being connect with STM32 chip;The PC machine being connect with USB OTG FS module;Carry file system on STM32 chip, and distribute the first buffer area, the second buffer area, third buffer area and temporal information buffer area.It is incoming whether STM32 chip real-time monitoring has sonar data, and judges the source of data;Write information into different buffer areas;Creation has date file folder, and the creation time file under date file folder in SD card;The data that USART module and SPI module are transmitted in the 1s time form a data packet;Being written in every time file to SD card will be in next time file in the data deposit SD card of next data packet after data packet has reached 1 minute duration;USB OTG FS module reads the data stored in SD card after detecting and powering on and connect with PC machine, and is sent to PC machine by USB data line.

Description

A kind of sonar contact data recording equipment and recording method
Technical field
The present invention relates to Data recording technique fields, more particularly, to a kind of sonar contact data recording equipment, the present invention Further relate to a kind of recording method of sonar contact data.
Background technique
Sonar contact detects submarine target using underwater acoustic wave, is widely used in torpedo guidance, sea mine fuze, and The locating fish, offshore oil drilling, marine navigation, underwater operation, hydrographic survey and exploration of submarine geology and geomorphology etc..For multiple For miscellaneous marine environment, noise and barrier will be encountered in detection process, so that the data of required sonar contact are increasingly huge Greatly, it needs to record a large amount of and complicated data.
CN106707826A disclosed a kind of steering data record circuit, including microprocessor on May 24th, 2017, And the peripheral circuit of microprocessor;Peripheral circuit includes crystal oscillating circuit, power circuit, RS485 serial port circuit, SD card circuit;Institute Microprocessor is stated using STM32F103RCT6.
Data record and storage use RAM and FLASH in single-chip microcontroller mostly at present, or by SD card and USB flash disk equipment.But The data general user being stored in RAM and FLASH intuitively can not analyze and export, and smaller for the data volume of storage, this It results in that a large amount of and complicated sonar contact data can not be recorded;If the data being stored in the equipment such as SD card and USB flash disk are directly write Enter, then easily occurs rambling data when needing additionally to write host computer procedure and export stored data, and exporting, is difficult to Analysis, this will bring difficulty for the data process&analysis in later period.
Summary of the invention
For overcome the deficiencies in the prior art, it can be stored largely technical problem to be solved by the invention is to provide a kind of Data and data can intuitively be exported to PC machine no longer need to the sonar contact data recording equipment read by host computer and note Recording method.
In order to solve the above-mentioned technical problem, according to an aspect of the present invention, the present invention provides a kind of sonar contact data Recording device, including STM32 chip;The USART module that is connect with the STM32 chip communication, SPI module, with SD card Memory module and USB OTG FS module;The PC machine being connect by USB data line with USB OTG FS module;The STM32 core On piece carry file system, and distribute the first buffer area, the second buffer area, third buffer area and temporal information buffer area;
Acceleration, posture information and the target detected when the data of the SPI module transfer include sonar floating or dive Data information;The data of the USART module transfer include the azimuth information and current temporal information of sonar present position;Institute It states whether STM32 chip real-time monitoring has data to be passed to, and judges the source of data;
When STM32 chip detects that USART module when transmitting data, judges transmitted data content;When the number transmitted According to content be temporal information when, by temporal information write time information cache area;When STM32 chip judges SD card with the presence or absence of this Between the date date file folder;The date file folder on the date if it exists, then in STM32 chip read access time information cache area When, minute, second temporal information, the date date file folder under creation one according to this when, minute, second temporal information name when Between file;If it does not exist the Time of Day date file folder, then the year in STM32 chip read access time information cache area, the moon, Day date information creates the new date file named according to the year, month, day date information in SD card, and when reading Between in information cache area when, minute, second temporal information, when creating one under the new date file according to this, when minute, second Between information name time file;When the data content transmitted is the azimuth information data of sonar present position, STM32 core The data are written piece since the first address of third buffer area, judge whether third buffer area is write after completion of writing the data It is full, if buffer area does not write the end address that the address pointer direction written data of data is completely written;If buffer area has been write Full, then the address pointer that data are written is directed toward the first address of third buffer area, the other data covers that will be had been written into;
When STM32 chip detects SPI module when transmitting data, which is write since the first address of the first buffer area Enter, the first buffer area is written in the data in the preceding 0.5s time that SPI module transfer is come;After the first buffer area is write completely, open The address pointer of SD card is directed toward the first address for the time file that the SD card is created by the time file that SD card is created, will The data in the preceding 0.5s time that SPI module transfer comes are stored in this time file;In the rear 0.5s time that SPI module transfer is come Data be written since the first address of the second buffer area;When SPI module transfer come after the 0.5s time in data all connect After receiving write-in, the address pointer of the second buffer area is directed toward to the knot of data in the rear 0.5s time that SPI module transfer be written comes The second buffer area is written in azimuth information data in third buffer area by beam address;Open the time file that SD card is created, SD The address pointer of card is directed toward the tail address of the time file written data, in the rear 0.5s time that SPI module transfer is come Data and azimuth information data are stored in the time file;
The data that USART module and SPI module are transmitted in the 1s time form a data packet, and data packet includes that write-in first is slow Deposit the rear 0.5s that the second buffer area SPI module transfer of data and write-in in the preceding 0.5s time of the SPI module transfer in area comes Data and azimuth information data in time;The writing mode for the data that USART module and SPI module are transmitted in every 1s time Carried out according to this by abovementioned steps, guarantee data transimission and storage when without mistakes and omissions and frame losing;
After a data packet is written in every time file to SD card, STM32 chip judges the sum being written in the time file According to whether 1 minute duration is reached, if not up to 1 minute duration, continue in the data deposit SD card by next data packet In the time file;If having reached 1 minute duration, the write time after the time of temporal information buffer area is increased by 1 minute In information cache area, and the temporal information before covering;STM32 chip judges SD card with the presence or absence of modified Time of Day Date file folder;The date file folder on the date if it exists, then it is modified in STM32 chip read access time information cache area When, minute, second temporal information, the date date file folder under creation one according to modification after when, minute, second temporal information name Next time file;The date file of the Time of Day presss from both sides if it does not exist, then STM32 chip read access time information cache area In modified year, month, day date information, in SD card create one according to modified year, month, day date information name Next date file folder, and it is modified in read access time information cache area when, minute, second temporal information, in the new date Under file create one according to after modification when, minute, second temporal information name next time file;Then by next number According in next time file in the data deposit SD card of packet;
USB OTG FS module reads the data stored in SD card after detecting and powering on and connect with PC machine, and passes through USB Data line is sent to PC machine.
According to another aspect of the present invention, the present invention provides a kind of sonar contact data record method, is applied to sonar In detection data recording device, the sonar contact data recording equipment includes STM32 chip;With the STM32 chip communication USART serial ports transmission module, SPI transmission module, the memory module with SD card and the USB OTG FS module of connection;Pass through The PC machine that USB data line is connect with USB OTG FS module;Carry file system on the STM32 chip, and distribute first Buffer area, the second buffer area, third buffer area and temporal information buffer area;Data recording process the following steps are included:
Acceleration, posture information and the target detected when the data of the SPI module transfer include sonar floating or dive Data information;The data of the USART module transfer include the azimuth information and current temporal information of sonar present position;Institute It states whether STM32 chip real-time monitoring has data to be passed to, and judges the source of data;
When STM32 chip detects that USART module when transmitting data, judges transmitted data content;When the number transmitted According to content be temporal information when, by temporal information write time information cache area;When STM32 chip judges SD card with the presence or absence of this Between the date date file folder;The date file folder on the date if it exists, then in STM32 chip read access time information cache area When, minute, second temporal information, the date date file folder under creation one according to this when, minute, second temporal information name when Between file;If it does not exist the Time of Day date file folder, then the year in STM32 chip read access time information cache area, the moon, Day date information creates the new date file named according to the year, month, day date information in SD card, and when reading Between in information cache area when, minute, second temporal information, when creating one under the new date file according to this, when minute, second Between information name time file;When the data content transmitted is the azimuth information data of sonar present position, STM32 core The data are written piece since the first address of third buffer area, judge whether third buffer area is write after completion of writing the data It is full, if buffer area does not write the end address that the address pointer direction written data of data is completely written;If buffer area has been write Full, then the address pointer that data are written is directed toward the first address of third buffer area, the other data covers that will be had been written into;
When STM32 chip detects SPI module when transmitting data, which is write since the first address of the first buffer area Enter, the first buffer area is written in the data in the preceding 0.5s time that SPI module transfer is come;After the first buffer area is write completely, open The address pointer of SD card is directed toward the first address for the time file that the SD card is created by the time file that SD card is created, will The data in the preceding 0.5s time that SPI module transfer comes are stored in this time file;In the rear 0.5s time that SPI module transfer is come Data be written since the first address of the second buffer area;When SPI module transfer come after the 0.5s time in data all connect After receiving write-in, the address pointer of the second buffer area is directed toward to the knot of data in the rear 0.5s time that SPI module transfer be written comes The second buffer area is written in azimuth information data in third buffer area by beam address;Open the time file that SD card is created, SD The address pointer of card is directed toward the tail address of the time file written data, in the rear 0.5s time that SPI module transfer is come Data and azimuth information data are stored in the time file;
The data that USART module and SPI module are transmitted in the 1s time form a data packet, and data packet includes that write-in first is slow Deposit the rear 0.5s that the second buffer area SPI module transfer of data and write-in in the preceding 0.5s time of the SPI module transfer in area comes Data and azimuth information data in time;The writing mode for the data that USART module and SPI module are transmitted in every 1s time Carried out according to this by abovementioned steps, guarantee data transimission and storage when without mistakes and omissions and frame losing;
After a data packet is written in every time file to SD card, STM32 chip judges the sum being written in the time file According to whether 1 minute duration is reached, if not up to 1 minute duration, continue in the data deposit SD card by next data packet In the time file;If having reached 1 minute duration, the write time after the time of temporal information buffer area is increased by 1 minute In information cache area, and the temporal information before covering;STM32 chip judges SD card with the presence or absence of modified Time of Day Date file folder;The date file folder on the date if it exists, then it is modified in STM32 chip read access time information cache area When, minute, second temporal information, the date date file folder under creation one according to modification after when, minute, second temporal information name Next time file;The date file of the Time of Day presss from both sides if it does not exist, then STM32 chip read access time information cache area In modified year, month, day date information, in SD card create one according to modified year, month, day date information name Next date file folder, and it is modified in read access time information cache area when, minute, second temporal information, in the new date Under file create one according to after modification when, minute, second temporal information name next time file;Then by next number According in next time file in the data deposit SD card of packet;
USB OTG FS module reads the data stored in SD card after detecting and powering on and connect with PC machine, and passes through USB Data line is sent to PC machine.
Technical solution provided by the invention is that filename stores mass data, guarantee data using the time, it can be achieved that orderly Without mistakes and omissions, and intuitively data can be exported to PC machine by USB interface and data line, to carry out data analysis and processing.
Internal data mode based on STM32, can record a large amount of data and data can be exported intuitively by PC machine, be not necessarily to It is read again by host computer.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and is constituted part of this application, schematic reality of the invention It applies example and its explanation is used to explain the present invention, do not constitute improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the principle schematic diagram of embodiment sonar contact data recording equipment.
Specific embodiment
The present invention will be further explained below with reference to the attached drawings.
Sonar contact data recording equipment as shown in Figure 1, including STM32 chip 1;With 1 communication link of STM32 chip USART module 2, SPI module 3, the memory module 4 with SD card and the USB OTG FS module 5 connect;By USB data line with The PC machine 6 that USB OTG FS module 5 connects;Carry file system on the STM32 chip 1, and distribute the first buffer area, Two buffer areas, third buffer area and temporal information buffer area.
The data recording process of sonar contact data recording equipment the following steps are included:
Acceleration, posture information and the target data detected when the data that SPI module 3 is transmitted include sonar floating or dive Information;The data that USART module 2 is transmitted include the azimuth information and current temporal information of sonar present position;STM32 core It is incoming whether 1 real-time monitoring of piece has data, and judges the source of data.Sonar is typically provided accelerometer, gyroscope, magnetometer It is used to acquire the acceleration and attitude data of sonar Deng, accelerometer, gyroscope, magnetometer, then resolves its roll angle, bows The elevation angle, azimuth information data.P sound pressure channel information, the X-axis channel particle information, Y-axis channel acquired during sonar detection Particle information, the number of targets such as target frequency and orientation, acoustic pressure and Particle Vibration Velocity can be calculated by FFT transform it is believed that Breath.
When STM32 chip 1 detects that USART module 2 when transmitting data, judges transmitted data content;When being passed When defeated data content is temporal information, by temporal information write time information cache area;Whether STM32 chip 1 judges SD card There are the date file of Time of Day folders;The date file on the date presss from both sides if it exists, then 1 read access time information of STM32 chip In buffer area when, minute, second temporal information, the date date file folder under creation one according to this when, the minute, second time letter Cease the time file of name;The date file of the Time of Day presss from both sides if it does not exist, then 1 read access time information cache of STM32 chip Year, month, day date information in area creates the new date file named according to the year, month, day date information in SD card Folder, and in read access time information cache area when, minute, second temporal information, under the new date file create a basis This when, minute, second temporal information name time file;When the azimuth information number that the data content transmitted is sonar present position According to when, the data are written STM32 chip 1 since the first address of third buffer area, judge third after completion of writing the data It is full whether buffer area is write, if buffer area does not write the end address that the address pointer direction written data of data is completely written;If Buffer area has write the first address that the address pointer direction third buffer area of data is completely then written, and the other data having been written into are covered Lid.
When STM32 chip 1 detects SPI module 3 when transmitting data, which is opened from the first address of the first buffer area Begin to be written, data the first buffer area of write-in in the preceding 0.5s time that the transmission of SPI module 3 is come;After the first buffer area is write completely, The time file that SD card is created is opened, the address pointer of SD card is directed toward to the first address for the time file that SD card is created, it will The data in the preceding 0.5s time that the transmission of SPI module 3 comes are stored in this time file;The rear 0.5s time that the transmission of SPI module 3 is come Interior data are written since the first address of the second buffer area;The data after transmission of SPI module 3 comes in the 0.5s time are whole After receiving write-in, the address pointer of the second buffer area is directed toward data in the rear 0.5s time that the transmission of SPI module 3 be written comes The second buffer area is written in azimuth information data in third buffer area by end address;The time file that SD card is created is opened, The address pointer of SD card is directed toward the tail address of the time file written data, in the rear 0.5s time that the transmission of SPI module 3 is come Data and azimuth information data be stored in the time file.
The data that USART module 2 and SPI module 3 are transmitted in the 1s time form a data packet, and data packet includes write-in Data and write-in the second buffer area SPI module 3 transmission in the transmission of SPI module 3 of the first buffer area next preceding 0.5s time are come The rear 0.5s time in data and azimuth information data;The data that USART module 2 and SPI module 3 are transmitted in every 1s time Writing mode carried out according to this by abovementioned steps, guarantee data transimission and storage when without mistakes and omissions and frame losing.
After a data packet is written in every time file to SD card, what STM32 chip 1 judged to be written in the time file Whether total data reaches 1 minute duration, if not up to 1 minute duration, continues the data of next data packet being stored in SD card In the time file in;If having reached 1 minute duration, be written after the time of temporal information buffer area is increased by 1 minute In temporal information buffer area, and the temporal information before covering;STM32 chip 1 judges SD card with the presence or absence of the modified time The date file on date presss from both sides;The date file folder on the date if it exists, then repair in 1 read access time information cache area of STM32 chip After changing when, minute, second temporal information, the date date file folder under creation one according to modification after when, the minute, second time letter Cease next time file of name;The date file folder of the Time of Day if it does not exist, then 1 read access time of STM32 chip is believed Modified year, month, day date information in buffer area is ceased, one is created in SD card and is believed according to the modified year, month, day date Breath name next date file folder, and it is modified in read access time information cache area when, minute, second temporal information, at this Under new date file create one according to after modification when, minute, second temporal information name next time file;Then will under In next time file in the data deposit SD card of one data packet.
USB OTG FS module 5 reads the data stored in SD card after detecting and powering on and connect with PC machine 6, and leads to It crosses USB data line and is sent to PC machine 6.
Technical solution provided by the invention can realize it is orderly, using the time as filename store mass data, guarantee data Without mistakes and omissions, and intuitively data can be exported to PC machine by USB interface and data line, to carry out data analysis and processing.
For those skilled in the art, the invention may be variously modified and varied.It is all to be wanted in right of the present invention Within the spirit and principle asked, any modification, equivalent replacement, improvement and so on should be included in protection scope of the present invention Within.

Claims (2)

1. a kind of sonar contact data recording equipment, including STM32 chip (1);With the STM32 chip (1) communication connection USART module (2), SPI module (3), memory module (4) and USB OTG FS module (5) with SD card;Pass through usb data The PC machine (6) that line is connect with USB OTG FS module (5);It is characterized in that, carry file system on the STM32 chip (1), And distribute the first buffer area, the second buffer area, third buffer area and temporal information buffer area;
Acceleration, posture information and the mesh detected when the data of SPI module (3) transmission include sonar floating or dive Mark data information;The data of USART module (2) transmission include believing the azimuth information of sonar present position and current time Breath;It is incoming whether STM32 chip (1) real-time monitoring has data, and judges the source of data;
When STM32 chip (1) detects that USART module (2) when transmitting data, judges transmitted data content;When being passed When defeated data content is temporal information, by temporal information write time information cache area;STM32 chip (1) judges that SD card is It is no that there are the date file of Time of Day folders;The date file on the date presss from both sides if it exists, then STM32 chip (1) read access time In information cache area when, minute, second temporal information, the date date file folder under creation one according to this when, when minute, second Between information name time file;The date file folder of the Time of Day if it does not exist, then STM32 chip (1) read access time is believed The year, month, day date information in buffer area is ceased, a new day named according to the year, month, day date information is created in SD card Phase file, and in read access time information cache area when, minute, second temporal information, create one under the new date file It is a according to this when, the name of minute, second temporal information time file;When the orientation that the data content transmitted is sonar present position When information data, the data are written STM32 chip (1) since the first address of third buffer area, after completion of writing the data Judge whether third buffer area is write completely, if buffer area does not write the knot that the address pointer direction written data of data is completely written Beam address;If buffer area has write the first address that the address pointer direction third buffer area of data is completely written, by its having been written into Its data cover;
When STM32 chip (1) detects SPI module (3) when transmitting data, which is opened from the first address of the first buffer area Begin to be written, data the first buffer area of write-in in the preceding 0.5s time that SPI module (3) transmission is come;When the first buffer area is write completely Afterwards, the time file that SD card is created is opened, the address pointer of SD card is directed toward to the head for the time file that the SD card is created Address, the data deposit this time file in the preceding 0.5s time that SPI module (3) transmission is come;SPI module (3) transmission is come The rear 0.5s time in data be written since the first address of the second buffer area;As the rear 0.5s that SPI module (3) transmission comes After interior data all receive write-in, the address pointer direction SPI module (3) be written of the second buffer area is transmitted after coming The second buffer area is written in azimuth information data in third buffer area by the end address of data in the 0.5s time;Open SD card The time file created, the address pointer of SD card are directed toward the tail address of the time file written data, by SPI module (3) Data and azimuth information data in the transmission next rear 0.5s time are stored in the time file;
The data that USART module (2) and SPI module (3) are transmitted in the 1s time form a data packet, and data packet includes write-in The data and write-in the second buffer area SPI module (3) biography in the preceding 0.5s time that SPI module (3) transmission of first buffer area comes Data and azimuth information data in the defeated next rear 0.5s time;USART module (2) and SPI module (3) are passed in every 1s time The writing mode of defeated data is carried out according to this by abovementioned steps, guarantee data transimission and storage when without mistakes and omissions and frame losing;
After a data packet is written in every time file to SD card, STM32 chip (1) judges to be written in the time file total Whether data reach 1 minute duration, if not up to 1 minute duration, continue in the data deposit SD card by next data packet The time file in;If having reached 1 minute duration, when being written after the time of temporal information buffer area is increased by 1 minute Between in information cache area, and the temporal information before covering;STM32 chip (1) judges SD card with the presence or absence of the modified time The date file on date presss from both sides;The date file folder on the date if it exists, then in STM32 chip (1) read access time information cache area When modified, minute, second temporal information, the date date file folder under creation one according to modification after when, the minute, second time Next time file of information name;The date file folder of the Time of Day if it does not exist, then when STM32 chip (1) is read Between modified year, month, day date information in information cache area, one is created in SD card according to modified year, month, day day Phase information name next date file folder, and it is modified in read access time information cache area when, minute, second temporal information, Under the new date file create one according to modification after when, minute, second temporal information name next time file;So It afterwards will be in next time file in the data deposit SD card of next data packet;
USB OTG FS module (5) reads the data stored in SD card after detecting and powering on and connect with PC machine (6), and leads to It crosses USB data line and is sent to PC machine (6).
2. a kind of sonar contact data record method, which is characterized in that be applied in sonar contact data recording equipment, the sound Detection data recording device includes STM32 chip (1);With the STM32 chip (1) communication connection USART module (2), SPI module (3), memory module (4) and USB OTG FS module (5) with SD card;Pass through USB data line and USB OTG FS The PC machine (6) of module (5) connection;Carry file system on the STM32 chip (1), and distribute the first buffer area, second slow Deposit area, third buffer area and temporal information buffer area;Data recording process the following steps are included:
Acceleration, posture information and the mesh detected when the data of SPI module (3) transmission include sonar floating or dive Mark data information;The data of USART module (2) transmission include believing the azimuth information of sonar present position and current time Breath;It is incoming whether STM32 chip (1) real-time monitoring has data, and judges the source of data;
When STM32 chip (1) detects that USART module (2) when transmitting data, judges transmitted data content;When being passed When defeated data content is temporal information, by temporal information write time information cache area;STM32 chip (1) judges that SD card is It is no that there are the date file of Time of Day folders;The date file on the date presss from both sides if it exists, then STM32 chip (1) read access time In information cache area when, minute, second temporal information, the date date file folder under creation one according to this when, when minute, second Between information name time file;The date file folder of the Time of Day if it does not exist, then STM32 chip (1) read access time is believed The year, month, day date information in buffer area is ceased, a new day named according to the year, month, day date information is created in SD card Phase file, and in read access time information cache area when, minute, second temporal information, create one under the new date file It is a according to this when, the name of minute, second temporal information time file;When the orientation that the data content transmitted is sonar present position When information data, the data are written STM32 chip (1) since the first address of third buffer area, after completion of writing the data Judge whether third buffer area is write completely, if buffer area does not write the knot that the address pointer direction written data of data is completely written Beam address;If buffer area has write the first address that the address pointer direction third buffer area of data is completely written, by its having been written into Its data cover;
When STM32 chip (1) detects SPI module (3) when transmitting data, which is opened from the first address of the first buffer area Begin to be written, data the first buffer area of write-in in the preceding 0.5s time that SPI module (3) transmission is come;When the first buffer area is write completely Afterwards, the time file that SD card is created is opened, the address pointer of SD card is directed toward to the head for the time file that the SD card is created Address, the data deposit this time file in the preceding 0.5s time that SPI module (3) transmission is come;SPI module (3) transmission is come The rear 0.5s time in data be written since the first address of the second buffer area;As the rear 0.5s that SPI module (3) transmission comes After interior data all receive write-in, the address pointer direction SPI module (3) be written of the second buffer area is transmitted after coming The second buffer area is written in azimuth information data in third buffer area by the end address of data in the 0.5s time;Open SD card The time file created, the address pointer of SD card are directed toward the tail address of the time file written data, by SPI module (3) Data and azimuth information data in the transmission next rear 0.5s time are stored in the time file;
The data that USART module (2) and SPI module (3) are transmitted in the 1s time form a data packet, and data packet includes write-in The data and write-in the second buffer area SPI module (3) biography in the preceding 0.5s time that SPI module (3) transmission of first buffer area comes Data and azimuth information data in the defeated next rear 0.5s time;USART module (2) and SPI module (3) are passed in every 1s time The writing mode of defeated data is carried out according to this by abovementioned steps, guarantee data transimission and storage when without mistakes and omissions and frame losing;
After a data packet is written in every time file to SD card, STM32 chip (1) judges to be written in the time file total Whether data reach 1 minute duration, if not up to 1 minute duration, continue in the data deposit SD card by next data packet The time file in;If having reached 1 minute duration, when being written after the time of temporal information buffer area is increased by 1 minute Between in information cache area, and the temporal information before covering;STM32 chip (1) judges SD card with the presence or absence of the modified time The date file on date presss from both sides;The date file folder on the date if it exists, then in STM32 chip (1) read access time information cache area When modified, minute, second temporal information, the date date file folder under creation one according to modification after when, the minute, second time Next time file of information name;The date file folder of the Time of Day if it does not exist, then when STM32 chip (1) is read Between modified year, month, day date information in information cache area, one is created in SD card according to modified year, month, day day Phase information name next date file folder, and it is modified in read access time information cache area when, minute, second temporal information, Under the new date file create one according to modification after when, minute, second temporal information name next time file;So It afterwards will be in next time file in the data deposit SD card of next data packet;
USB OTG FS module (5) reads the data stored in SD card after detecting and powering on and connect with PC machine, and passes through USB data line is sent to PC machine.
CN201810491989.9A 2018-05-22 2018-05-22 Sonar detection data recording device and recording method Active CN108959114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810491989.9A CN108959114B (en) 2018-05-22 2018-05-22 Sonar detection data recording device and recording method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810491989.9A CN108959114B (en) 2018-05-22 2018-05-22 Sonar detection data recording device and recording method

Publications (2)

Publication Number Publication Date
CN108959114A true CN108959114A (en) 2018-12-07
CN108959114B CN108959114B (en) 2022-12-16

Family

ID=64499372

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810491989.9A Active CN108959114B (en) 2018-05-22 2018-05-22 Sonar detection data recording device and recording method

Country Status (1)

Country Link
CN (1) CN108959114B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116730A (en) * 2020-09-09 2020-12-22 天津津航计算技术研究所 Data storage method of universal airborne data acquisition and recording device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001051877A (en) * 1999-08-09 2001-02-23 Casio Comput Co Ltd Device and method for storing data
JP2008140376A (en) * 2006-11-10 2008-06-19 Fujitsu Ten Ltd Information recording device for vehicle, program, and recording medium
JP2009069109A (en) * 2007-09-18 2009-04-02 Toshiba Corp Sonar detection information processor
CN201234382Y (en) * 2008-07-31 2009-05-06 华南理工大学 SD card data reading transmission system based on FPGA and AVR
CN102023937A (en) * 2010-11-19 2011-04-20 苏州国芯科技有限公司 Dataflow encryption method for USB (Universal Serial Bus) storage equipment
CN102495848A (en) * 2011-11-17 2012-06-13 深圳市赛格导航科技股份有限公司 Method for processing massive GPS (global positioning system) data and system
CN103324583A (en) * 2013-07-02 2013-09-25 浙江大学 Offline high-speed fiber-optic gyroscope data acquisition method
RU150422U1 (en) * 2014-03-12 2015-02-20 Федеральное государственное казенное военное образовательное учреждение высшего профессионального образования "Военный учебно-научный центр Военно-Морского Флота "Военно-морская академия имени Адмирала Флота Советского Союза Н.Г. Кузнецова" MOBILE HYDROACOUSTIC INFORMATION COLLECTION, PROCESSING AND OPERATIONAL STORAGE SYSTEM
CN106354429A (en) * 2016-08-26 2017-01-25 杨百川 Data storage module for UAV flight control system and storage method thereof
CN107340777A (en) * 2016-12-06 2017-11-10 北京臻迪科技股份有限公司 A kind of underwater unmanned boat control system and method
CN107786852A (en) * 2017-11-17 2018-03-09 上海遨拓深水装备技术开发有限公司 A kind of submersible high-speed high capacity data transfer and storage system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001051877A (en) * 1999-08-09 2001-02-23 Casio Comput Co Ltd Device and method for storing data
JP2008140376A (en) * 2006-11-10 2008-06-19 Fujitsu Ten Ltd Information recording device for vehicle, program, and recording medium
JP2009069109A (en) * 2007-09-18 2009-04-02 Toshiba Corp Sonar detection information processor
CN201234382Y (en) * 2008-07-31 2009-05-06 华南理工大学 SD card data reading transmission system based on FPGA and AVR
CN102023937A (en) * 2010-11-19 2011-04-20 苏州国芯科技有限公司 Dataflow encryption method for USB (Universal Serial Bus) storage equipment
CN102495848A (en) * 2011-11-17 2012-06-13 深圳市赛格导航科技股份有限公司 Method for processing massive GPS (global positioning system) data and system
CN103324583A (en) * 2013-07-02 2013-09-25 浙江大学 Offline high-speed fiber-optic gyroscope data acquisition method
RU150422U1 (en) * 2014-03-12 2015-02-20 Федеральное государственное казенное военное образовательное учреждение высшего профессионального образования "Военный учебно-научный центр Военно-Морского Флота "Военно-морская академия имени Адмирала Флота Советского Союза Н.Г. Кузнецова" MOBILE HYDROACOUSTIC INFORMATION COLLECTION, PROCESSING AND OPERATIONAL STORAGE SYSTEM
CN106354429A (en) * 2016-08-26 2017-01-25 杨百川 Data storage module for UAV flight control system and storage method thereof
CN107340777A (en) * 2016-12-06 2017-11-10 北京臻迪科技股份有限公司 A kind of underwater unmanned boat control system and method
CN107786852A (en) * 2017-11-17 2018-03-09 上海遨拓深水装备技术开发有限公司 A kind of submersible high-speed high capacity data transfer and storage system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
YASUHARU OHTA ET AL: "A Store-Carry-Forward-Based Data Transfer Scheme Using Positions and Moving Direction of Vehicles for VANETs", 《 2011 TENTH INTERNATIONAL SYMPOSIUM ON AUTONOMOUS DECENTRALIZED SYSTEMS》 *
刘纪元等: "合成孔径声呐并行实时处理研究", 《电子与信息学报》 *
徐健等: "DS3231在嵌入式环境文件系统中的应用", 《单片机与嵌入式系统应用》 *
江国和等: "基于TMS320VC5509A的声呐阵流噪声数据采集系统", 《舰船科学技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116730A (en) * 2020-09-09 2020-12-22 天津津航计算技术研究所 Data storage method of universal airborne data acquisition and recording device

Also Published As

Publication number Publication date
CN108959114B (en) 2022-12-16

Similar Documents

Publication Publication Date Title
US6266789B1 (en) Deep trace memory system for a protocol analyzer
CN108474864A (en) Ocean floor seismic system
JP6806305B2 (en) Submarine resource exploration system, signal processing method, electrical exploration method and electromagnetic exploration method
CN208012618U (en) A kind of sea pipe investigating system
JP6280768B2 (en) Tunnel elastic wave exploration method and tunnel elastic wave exploration system used therefor
CN103163567B (en) Based on air gun wavelet bubble ratio analytical approach and the device of energy
CN108959114A (en) A kind of sonar contact data recording equipment and recording method
CN104820248A (en) Ship-borne magnetic force detection method and device
CN104657294B (en) Methods for detecting phase and phase detection
CN103941579B (en) A kind of moment for oceanographic instrumentation records and clock synchronizing method
CN107817537B (en) Wear control method and device, the wearable device of detection
CN106326397A (en) Method and device for generating index file
CN108959115B (en) Data recording system and recording method based on suspended detection sonar
CN108318489A (en) A kind of system and method for the real-time storage of Tunnel testing data
CN203687956U (en) SD (secure digital memory) card control circuit in strapdown inertial navigation system
WO2020140361A1 (en) Fpga-based intelligent storage control system and application thereof
CN101915937A (en) Seismic data recording method and system of marine streamer
CN108957525A (en) The continuous recording method of earthquake data acquisition
JP5142632B2 (en) Magnetic signal detection method, magnetic signal detection program, and magnetic signal detection apparatus
CN105825876A (en) Measurement and control data playback method of unmanned aerial vehicle
CN104570059B (en) A kind of water-bed vibrations self-collection method and the device of underwater demolition
CN204374433U (en) The autonomous harvester of a kind of submarine blast bottom vibrations
CN106225808B (en) Marine geophysical prospecting integrated navigation information playback instrument and system
KR102480565B1 (en) System and method for collecting big data for autonomous navigation of unmanned ships
Green et al. Smart modems—Underwater capabilities beyond communications

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
GR01 Patent grant
GR01 Patent grant