CN102075290B - Aerial bus data coding and decoding methods - Google Patents

Aerial bus data coding and decoding methods Download PDF

Info

Publication number
CN102075290B
CN102075290B CN 201010610296 CN201010610296A CN102075290B CN 102075290 B CN102075290 B CN 102075290B CN 201010610296 CN201010610296 CN 201010610296 CN 201010610296 A CN201010610296 A CN 201010610296A CN 102075290 B CN102075290 B CN 102075290B
Authority
CN
China
Prior art keywords
data
sign
ltz
result
assigned
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.)
Expired - Fee Related
Application number
CN 201010610296
Other languages
Chinese (zh)
Other versions
CN102075290A (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.)
Northwestern Polytechnical University
Original Assignee
Northwestern Polytechnical University
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 Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN 201010610296 priority Critical patent/CN102075290B/en
Publication of CN102075290A publication Critical patent/CN102075290A/en
Application granted granted Critical
Publication of CN102075290B publication Critical patent/CN102075290B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses aerial bus data coding and decoding methods. In the invention, a coding result is obtained by determining all attributes of coded data, determining code numerical value, setting interdata, assigning values and processing a symbol in turn, and a decoding result is obtained by determining all attributes of data to be decoded, calculating effective data bit to be decoded, calculating the maximum value of the effective data bit before decoding, setting a target code to be decoded and determining a data symbol in turn. In the uniform coding and decoding methods for various data, the data symbol can be set at any position of the data, and two data bits can be set as symbol bits.

Description

A kind of coding-decoding method of aviation bus data
Technical field
The present invention relates to a kind of coding-decoding method.
Background technology
In present generation aircraft, the transmission of bus message relates to the coding and decoding problem of data between the subsystems of avionics system.In the data transfer process, source node need to be encoded into original physical data the word that bus can transmit/byte form, arrives destination node through bus transfer, and destination node need to be original physical quantity with data decode, is convenient to user's operation.In the prior art, because different data transmission bus are (such as the ARINC429 bus, the 1553B bus, the RS232/422/485 bus) interface control document (Interface Control Document, ICD) form of Definition is different, the coding-decoding method of its data is difference to some extent also, such as the transmission for 32 bit data, adopt 32 coding and decoding systems, and for the transmission of 16 or 8 bit data, will adopt 16 or 8 s' coding-decoding method, said method does not also form unified standard in its available area, this has just caused the versatility of coding-decoding method poor, namely will adopt different coding-decoding methods for the data encoding decoding of isotopic number not.In addition, in existing coding-decoding method, the sign bit of data generally can only be located at highest order, lacks flexibility, also is not easy to the integration of data.
Summary of the invention
In order to overcome the deficiency of the poor and underaction of prior art reusability, the invention provides a kind of general aviation bus data coding/decoding method and realization thereof, can finish the coding/decoding of 32 (ARINC429 data), 16 (1553B data) and 8 (RS232/422/485 data), the method can be coded in sign bit any position of data simultaneously, and the long numeric data position can be set as sign bit.
The technical solution adopted for the present invention to solve the technical problems is as follows.
Coding method may further comprise the steps:
Step 1, determine all properties of data to be encoded.According to ICD as can be known, these attributes comprise that the effective value highest order of the rear data of coding is D h, lowest order is D l, the lowest order weights are Q, (the data symbol matrix represents with m_GEZ and m_LTZ sign matrix, is 32 integers, and wherein sign matrix m_GEZ perseverance is 0x00000000.If data are signed number, and D iThe position is sign bit, the D that then symbol matrix m_LTZ is corresponding iThe position is 1, and other positions are 0 entirely; If data are unsigned number, then symbol matrix m_LTZ is 0x00000000), the maximum m_Max of data, the minimum value m_Min of data.
Step 2, determine the numerical value of data to be encoded.If data to be encoded are floating number v, if v more than or equal to m_Max, then v is taken as m_Max; If v is less than or equal to m_Min, then v is taken as m_Min; If v at m_Max and m_Min between the two, then v is constant.
Step 3, establish v1, v2, v3, v4, S1 is intermediate variable, and is double word.Consider the rounding error of computer system, when providing precision algorithm: v to be nonnegative number below the employing, be assigned to v1 after (v/Q+0.5) rounded; When v is negative, be assigned to v1 after (v/Q-0.5) rounded.
Step 4, first D moves to left 1L (representing signless lint-long integer 0x00000001) lThe position, the result that obtains and v1 multiplied each other is assigned to v2 again, calculates simultaneously the afterwards shared valid data figure place nBits of data of coding, nBits=D h-D l+ 1.Further, the maximum of valid data position behind the calculation code, and with its D that moves to left lThe position, acquired results is double word Mask, namely Mask=((1L<<nBits)-1)<<D l, then v2 and Mask are done and computing, acquired results is assigned to v3.
Step 5, symbol are processed.M_GEZ and m_LTZ are made XOR, and the result is assigned to double word Sign.When v is nonnegative number, Sign and m_GEZ are done and computing, the result is assigned to S1; When v is negative, Sign and m_LTZ are done and computing, the result is assigned to S1.At last v3 and S1 are made exclusive disjunction, and the result is assigned to v4.
Step 6, v4 data are coding result.
Coding/decoding method may further comprise the steps:
Step 1, determine all properties of data to be decoded.According to ICD as can be known, these attributes comprise that the effective value highest order of the rear data of decoding is D h, lowest order is D l, the lowest order weights are Q, (the data symbol matrix represents with m_GEZ and m_LTZ sign matrix, is 32 integers, and wherein sign matrix m_GEZ perseverance is 0x00000000.If data are signed number, and D iThe position is sign bit, the D that then symbol matrix m_LTZ is corresponding iThe position is 1, and other positions are 0 entirely; If data are unsigned number, then symbol matrix m_LTZ is 0x00000000), the maximum m_Max of data, the minimum value m_Min of data.
Step 2, calculating need the valid data figure place nBits=D of decoding h-D l+ 1.
Step 3, calculate the maximum Mask of valid data position before the decoding, namely Mask=(1I<<nBits)-1.
Step 4, to establish object code to be decoded be dw, the dw D that moves to right lThe position is done acquired results and Mask and computing, and the result is v1, and then v1 multiply by Q, and the result is assigned to v2.
Step 5, specified data symbol.M_GEZ and m_LTZ are made XOR, and its result is assigned to double word Sign, then dw and Sign is done and computing, and the result is Sign1.
If step 6 Sign1 equates that with m_LTZ then v2 being taken as opposite number is v=-v2, otherwise v=v2.
Step 7, v are decoded result.
The invention has the beneficial effects as follows: in the transmission course of aviation bus data, ICD definition according to avionics system, by the setting to sign matrix different pieces of information position, can (comprise 32 ARINC429 data to various data, 16 1553B data and 8 RS422/485 data) carry out coding and decoding, realized unified coding-decoding method, in its available area, can form a kind of coding and decoding standard, and the present invention can be located at the data symbol position on the optional position of data, and the two bits position can be set, and (in the ARINC429 data, the usefulness two bits position that has is as sign bit as sign bit; In 1553B bus and RS422/485 data, generally use a data position as sign bit), this is that institute is irrealizable in traditional Encoding and Decoding, this advantage also is to realize by m_GEZ, m_LTZ, even sign bit is located at the D of data iThe position, only needing the correspondence position of m_LTZ is 1.For example, if sign bit is located at highest order D 15, only need that 0x8000 is assigned to m_LTZ and get final product; If sign bit is established D 11The position only needs that 0x0800 is assigned to m_LTZ and gets final product.
The present invention is further described below in conjunction with embodiment.
Embodiment
The coding and decoding embodiment of 16 1553B data of (1) sign bit is as described in example 1 and the example 2.
Embodiment of the method 1:
If the initial data of wish coding is v=60 (supposition v represents the impact point absolute altitude, is 16 1553B bus datas of needs coding).
The first step: determine the attribute of coded data, according to ICD as can be known, the highest order of data encoding is D h=14, lowest order is D l=0, the lowest order weights are that (m_GEZ is 0x0000, and m_LTZ is 0x8000, and namely sign bit is located at highest order D for the sign matrix of Q=0.25, data 15), the maximum of data is m_Max=2 15-1, minimum value is m_Min=-2 15
Second step: because v is between maximum m_Max and minimum value m_Min, so v is constant.
The 3rd step: v=60>0, so v1=v/Q+0.5 considers the computer rounding error, then v1=240.
The 4th step: v2=v1* (1L<<0)=(240) D=(00F0) H, nBits=14-0+1=15.Mask=0x7FFF,v3=v2&Mask=0x00F0。
The 5th step: Sign=m_GEZ^m_LTZ=0x8000.Because v>0, so S1=Sign﹠amp; M_GEZ=0x0000.v4=v3|S1=0x00F0。
The 6th step: 0x00F0 is coding result.
In like manner can obtain-60 coding result is 0xFF10.
Embodiment of the method 2:
Now " 0x00F0 " being done decoding processes.
The first step: determine the attribute of coded data, this step is with the first step of embodiment 1.
Second step: nBits=14-0+1=15.
The 3rd step: Mask=(1L<<15)-1=0x7FFF.
The 4th step: v1=(dw>>0) ﹠amp; Mask=(0x00F0) H=(240) D, v2=v1*Q=60.
The 5th step: Sign=m_GEZ^m_LTZ=0x8000.Sign1=dw&Sign=0x0000。
The 6th step: because Sign1 and m_LTZ are unequal, so v=v2=60.
The 7th step: 60 are decoded result.
The coding and decoding embodiment of 32 ARINC429 data of (2) two sign bits is as described in example 3 and the example 4.
Embodiment of the method 3:
If the initial data of wish coding is v=100 (supposition v represents the true air speed of carrier aircraft, is 32 ARINC429 bus datas of needs coding).
The first step: be 32 double word for coded data, according to ICD as can be known, the attribute of coded data is: the highest order of data encoding is D 29, the data encoding lowest order is D 0, data the lowest order weights be that the maximum of the sign matrix (m_GEZ=0x00000000, m_LTZ=0xC0000000) of Q=0.25, data, data is m_Max=2 30-1, the minimum value of data is m_Min=-2 30
Second step: because v is between maximum and minimum value, so v=100 is constant.
The 3rd step: because v>0, so v1=v/Q+0.5, the rounding error of consideration computer, then v1=400.
The 4th step: v2=v1* (1L<<0)=0x00000190, nBits=29-0+1=30.Mask=0x3FFFFFFF,v3=v2&Mask=0x00000190。
The 5th step: Sign=m_GEZ^m_LTZ=0xC0000000.Because v>0, so S1=Sign﹠amp; M_GEZ=0x00000000.v4=v3|S1=0x00000190。
The 6th step: 0x00000190 is coding result.
Embodiment of the method 4:
Now " 0x00000190 " being done decoding processes.
The first step: determine the attribute of coded data, this step is with the first step of embodiment 3.
Second step: nBits=29-0+1=30.
The 3rd step: Mask=(1L<<30)-1=0x3FFFFFFF.
The 4th step: v1=(dw>>0) ﹠amp; Mask=(0x00000190) H=(400) D, v2=v1*Q=100.
The 5th step: Sign=m_GEZ^m_LTZ=0xC0000000.Sign1=dw&Sign=0x00000000。
The 6th step: because Sign1 and m_LTZ are unequal, so v=v2=100.
The 7th step: 100 are decoded result.

Claims (2)

1. the coding method of an aviation bus data is characterized in that comprising the steps:
Step 1, determine all properties of data to be encoded, comprise that the effective value highest order of data is D behind the coding h, lowest order is D l, the lowest order weights are the maximum m_Max of Q, sign matrix, data, the minimum value m_Min of data; Sign matrix represents with m_GEZ and m_LTZ, is 32 integers, and wherein sign matrix m_GEZ perseverance is 0x00000000, if data are signed number, and D iThe position is sign bit, the D that then symbol matrix m_LTZ is corresponding iThe position is 1, and other positions are 0 entirely; If data are unsigned number, then symbol matrix m_LTZ is 0x00000000;
Step 2, determine the numerical value of data to be encoded, establishing data to be encoded is floating number v, if v more than or equal to m_Max, then v is taken as m_Max; If v is less than or equal to m_Min, then v is taken as m_Min; If v at m_Max and m_Min between the two, then v is constant;
Step 3, establish v1, v2, v3, v4, S1 is intermediate variable, and is double word; When v is nonnegative number, be assigned to v1 after (v/Q+0.5) rounded; When v is negative, be assigned to v1 after (v/Q-0.5) rounded;
Step 4, first the 1L D that moves to left lThe position, the result that obtains and v1 multiplied each other is assigned to v2 again, calculates simultaneously the afterwards shared valid data figure place nBits of data of coding, nBits=D h-D l+ 1; The maximum of valid data position behind the calculation code, and with its D that moves to left lThe position, acquired results is double word Mask, namely Mask=((1L<<nBits)-1)<<D l, then v2 and Mask are done and computing, acquired results is assigned to v3;
Step 5, m_GEZ and m_LTZ are made XOR, the result is assigned to double word Sign; When v is nonnegative number, Sign and m_GEZ are done and computing, the result is assigned to S1; When v is negative, Sign and m_LTZ are done and computing, the result is assigned to S1; At last v3 and S1 are made exclusive disjunction, and the result is assigned to v4;
Step 6, v4 data are coding result.
2. the coding/decoding method of an aviation bus data is characterized in that comprising the steps:
Step 1, determine all properties of data to be decoded, comprise that the effective value highest order of data is D after the decoding h, lowest order is D l, the lowest order weights are the maximum m_Max of Q, sign matrix, data, the minimum value m_Min of data; The data symbol matrix represents with m_GEZ and m_LTZ, is 32 integers, and wherein sign matrix m_GEZ perseverance is 0x00000000; If data are signed number, and D iThe position is sign bit, and the Di position that then symbol matrix m_LTZ is corresponding is 1, and other positions are 0 entirely; If data are unsigned number, then symbol matrix m_LTZ is 0x00000000;
Step 2, calculating need the valid data figure place nBits=D of decoding h-D l+ 1;
Step 3, calculate the maximum Mask of valid data position before the decoding, namely Mask=(1L<<nBits)-1;
Step 4, to establish object code to be decoded be dw, the dw Dl position that moves to right, acquired results and Mask done and computing, and the result is v1, and then v1 multiply by Q, and the result is assigned to v2;
Step 5, specified data symbol are done XOR to m_GEZ and m_LTZ, and its result is assigned to double word Sign, then dw and Sign are done and computing, and the result is Sign1;
If step 6 Sign1 equates that with m_LTZ then v2 being taken as opposite number is v=-v2, otherwise v=v2;
Step 7, v are decoded result.
CN 201010610296 2010-12-23 2010-12-23 Aerial bus data coding and decoding methods Expired - Fee Related CN102075290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010610296 CN102075290B (en) 2010-12-23 2010-12-23 Aerial bus data coding and decoding methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010610296 CN102075290B (en) 2010-12-23 2010-12-23 Aerial bus data coding and decoding methods

Publications (2)

Publication Number Publication Date
CN102075290A CN102075290A (en) 2011-05-25
CN102075290B true CN102075290B (en) 2013-04-24

Family

ID=44033647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010610296 Expired - Fee Related CN102075290B (en) 2010-12-23 2010-12-23 Aerial bus data coding and decoding methods

Country Status (1)

Country Link
CN (1) CN102075290B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656961B (en) * 2016-09-29 2019-08-13 海航航空技术股份有限公司 Flying quality based on ARINC767 specification decodes analysis method
CN108011693B (en) * 2017-11-08 2020-09-11 江西洪都航空工业集团有限责任公司 General data coding method based on ARINC429 bus communication

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0491068A1 (en) * 1990-12-18 1992-06-24 International Business Machines Corporation Selective data broadcasting receiver adapter for personal computers
CN1595812A (en) * 2003-09-10 2005-03-16 发那科株式会社 Error decoding circuit, data bus control method and data bus system
CN101167320A (en) * 2005-03-07 2008-04-23 同流技术控股有限公司 Symbol stream virtual radio organism method and apparatus
CN101421747A (en) * 2006-02-13 2009-04-29 索尼株式会社 System and method to combine multiple video streams

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0491068A1 (en) * 1990-12-18 1992-06-24 International Business Machines Corporation Selective data broadcasting receiver adapter for personal computers
CN1595812A (en) * 2003-09-10 2005-03-16 发那科株式会社 Error decoding circuit, data bus control method and data bus system
CN101167320A (en) * 2005-03-07 2008-04-23 同流技术控股有限公司 Symbol stream virtual radio organism method and apparatus
CN101421747A (en) * 2006-02-13 2009-04-29 索尼株式会社 System and method to combine multiple video streams

Also Published As

Publication number Publication date
CN102075290A (en) 2011-05-25

Similar Documents

Publication Publication Date Title
Shannon Two-way communication channels
CN105634499B (en) Data conversion method based on new short floating point type data
CN109739470B (en) Computing system based on arbitrary exponential function of type 2 hyperbolic CORDIC
CN110825323B (en) Storage and reading method of floating point number data and computer readable storage medium
CN101841730A (en) Real-time stereoscopic vision implementation method based on FPGA
CN102567439B (en) SRG (sphere rhombus grid) subdivision code and geographic coordinate converting algorithm
CN102075290B (en) Aerial bus data coding and decoding methods
CN106775577B (en) A kind of design method of the non-precision redundant manipulators multiplier of high-performance
CN103546161A (en) Lossless compression method based on binary processing
CN105426156A (en) High-performance imprecise multiplier and application method therefor
CN110222305B (en) Logarithmic function calculation system and method based on hyperbolic CORDIC
CN110187866B (en) Hyperbolic CORDIC-based logarithmic multiplication computing system and method
CN103176948B (en) A kind of single precision elementary function arithmetic accelerator of low cost
CN108390648A (en) A kind of Gaussian white noise generator based on FPGA
CN106992786B (en) Baseband data compression method, device and system
CN104349165B (en) The elongated decoding method of high-performance and device
CN103546169A (en) Method for achieving (2, 1, 7) convolutional coding at 3/4 rate in Field Programmable Gate Array (FPGA)
US20200242724A1 (en) Device and method for accelerating graphics processor units, and computer readable storage medium
Chaudhry Alternative numerical solutions of stationary queueing-time distributions in discrete-time queues: GI/G/1
CN105119960B (en) A kind of network data distributing method and the network equipment
CN103428502A (en) Decoding method and decoding system
CN105653390A (en) SoC system verification method
CN103699729B (en) Modulus multiplier
CN103684368B (en) Universal reversible compares interchanger
CN110738311A (en) LSTM network acceleration method based on high-level synthesis

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130424

Termination date: 20141223

EXPY Termination of patent right or utility model