登录
首页 » Others » 常用数据校验源代码(CRC8 CRC16 和校验 异或校验)

常用数据校验源代码(CRC8 CRC16 和校验 异或校验)

于 2020-12-07 发布
0 287
下载积分: 1 下载次数: 1

代码说明:

文档中包含了CRC8位数据校验 CRC16位数据校验 和校验 异或校验等常用校验方式,使用C++代码编写,很实用。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • C++实现回归算法(逻辑回归 线性回归)
    C++实现回归算法, 包含线性回归和逻辑回归, 代码干净, 整洁, 有注释, 具有良好的封装性, 可直接迁移使用
    2020-07-03下载
    积分:1
  • 最优化 拟牛顿法,高斯-牛顿法,LM法,共轭梯度法
    无约束最优化问题典型算法的MATLAB代码
    2020-07-04下载
    积分:1
  • BCH matlab
    BCH的matlab实现编译,里面有2个主要程序,编码,译码还有编译结果
    2020-12-01下载
    积分:1
  • 汽车噪声与振动-理论与应用
    汽车NVH领域的经典入门读物,引领进入汽车振动噪声研究的最佳选择。第一章管道声学(1.12)时,声压幅值达到最大,反节点的位子是:(1.13)驻波是由频率相同的向右传播的入射波和向左传播的反射波迭加而成。驻波并不是运动的波,而是静止的,这是“驻”波名称的由来。波表示管道中的声音的模态。对於长度一定的管道来说,由于有许多频率的波,因此也就有很多驻波。这里所提到的驻波是假设管壁刚硬,所冇声波遇到管壁时全部被反射回来。可是实际上,管端壁不是完全刚性,因此反射波的声压不完全等於入射波声压,因此在节点处,入射波和反射波不可能完全抵消。但是这些点处的声压大部分被抵消,声压最低。第二节管道声阻抗阻抗是指当对媒质受到压力或者搾动力时,媒质会对传播产生阻碍。管道中的声学阻抗Z,定义声压与质点体积速度的比值,即(1.14)式中,u,U和S分别是管道中的速度,体积速度和截面积。体积速度与质点速度的关系为:L=SL。声吝在管道內传播,当管道的截面积发生变化的时候,声阻抗也发生变化。图1.3是截面积变化的管道,在变截面的地方,由于阻抗发生变化,一部分入射波就会被发射回原来的管道而另一部分入射波会在新的截面管道中继续传播。抗性消音器的工作原就是基于这种阻抗的变化。声波从发动机出来并在进气或者排气系统中传播,当遇到消音元件或者截面积变化时,入射声波被反射回发动机声源,从而抑制声音的传播。进排气系统中声阻抗不匹配的情况主要有截面积变化,主管道中插入了其他管道(如旁支消音器等),管道开口通往大气等等图1.3截面积变化的管道进排气系统中管道的长度都是有限的。图1.4表小一个长度为L的管道。假改管道两端的声阻抗分别已知,即在=处,声阻抗为,在=处,声阻抗为由公式(1.6)和(1.9),可以得到管道中仟一点的声阻抗为管道声学图1.4长度为L的管道将=代入公式(1.15)中,得到该处的声阻抗为:将三代入公式(1.15)中,得到该处的声阻抗:公式(17)可以重新写成下面的形式18将方程(1.16)代入到方程(1.18中,消除和,就得到输入声阻抗和输出声阻抗的关系,如下第一章管道声学(1.20第三节管口封闭与管口敞廾声波从管道入口端发射出来,传播到尾端。管道尾端通常有两种情况,一种是开口的,如进气管口,排气尾管口;另一种是封口的,如四分之一波长管。下面就来分析这两种尾端的声学特征。1.开∏-封闭管道图1.5表示管道尾端封闭状况。声音在管道里问石传播,当声波碰到刚性的封闭端时,声波被全部反弹冋来,再向左传播管口封闭图1.5开凵封闭管道对一个刚性的封闭口来说,其声阻抗为无穷大,即>0,根据公式(1.19),得到:1.21)声阻抗可以写成下面的形式:(1.22)式中R和粉别是阻抗的实部和虚部,R为声阻,称为声抗。声阻取决于结构的材料特性,而声抗则取决」结构的儿何特性。当声抗为零的时候,结构就发生共振。公式(1.21)中的声阻抗也可以写成公式(1.22)那样的形式,为(1.23)上式如果满足下亩的条件:(1.24)即,那么这个开口-封闭管道就发生共振,其固有频率为:(1.25)当n-=1,2,3,.,时,分别对应著管道第·阶、第二阶、第三阶,,.,等阶次频率图1.6是管道声波的第一阶和第阶模态。这个声波在封闭端时,声压达大最大值,然后发射第一章管道声学到入口处,使得入口端的声压为零,即在开口端形成驻波节点。四分之一波长管就是应用这个原理来工作的。图1.6管道声波的第一阶模态(A)和第二阶模态(B)公式(1.25)可以转变为管道长度与波长的关系,表达如下1.26)当n=1时,管道的长度是波长的四分之,即:。所以这种开∏封闭的管道通常叫著四分之一泼长管2.开口开口答道图1.7为一个尾端开口的管」。声波从入口端向右传播进入开口端时,声音与大气产生声耦合。大气的辐射声阻抗会将一部分声波返回管口敞开图1.7开口-开口管道声波在尾端的声阻抗为周围坏境的声阻抗,也就是说这个声阻抗不为零。为了使问题简化起见,我们先假设这个阻抗为零,然后再对所得到的结构进行修正。如果在x=处的声阻抗为零,那么由公式(1.19)可以得到下式(1.27)同样,当这个声阻抗中的声抗为零的吋候,管道就发生共振,这时必须满足:即:这时,开口-开口管道的共振频率为:当n=1,2,3,,时,分别对应著管道第一阶、第二阶、第三阶,.,等阶次频率第一章管道声学图1.8是开口-开口管道声波的第一阶和第二阶模态。图1.8开口-开口管道的第一阶模态(A)和第二阶模态(B)公式(1.30)可以转变为管道长度与波长的关系,衣达如下(1.31)3.开口管道的修正在推导尾端廾口公式时,我们假设了出口周围坯境的声阻抗为零,但是实际上这个阻抗不为零,因此必须对公式(1.27-1.31)的结论做修止。对图1.9这样的开∏终端,被称为自由自由开口。该开口处的声阻抗为:等效管图1.9自山开口-开口修正管道山于管道的直径非常小,因此和都远远小于1。山公式(1.27)和(1.32)得到:(1.33)这样,管道内的频率为34)管道长度与波长的关系为(1.35这样管道的长度比声阻抗为零的时候要短些,也就是说好像有一根等效的延长管与原来的管道相连接。管道的计算长度就是实际管子长度加上等效延长管长度△即第一章管道声学(1.36有时侯,在出口管处还会加类似与法兰的结构,如图1.10所示。这时,有效延长管的长度为△实际管子的长度为:△式中是管子的计算长度发等效管图1.10法兰开口-开口修正管道第四节四端网终分析进气系统或者排气系统都是有很多管道和消音元件组成。分析整个系统往往是非常复杂的,但是如果将系统分解到一些小的段落,那么分析起来就相对容易些。得到了每个段落或者是每个部件的分析结果,然后将之合成起来就得到了整个系统的结果。四端网络分析就是这种分析方法,在管道声学分析中得到了广泛的应用。对於管道中一小段质量(如图1.11)来说,动力方程可以写成如下:(1.39)式中,S是管道的截面积,是这个小质量段的长度,和分别是质量端两边的压力图1.11管道中一小段质量的受力分析公式(1.39)可以表达为(1.40)第一章管道声学对这一小段质量来说,假设两边的速度是相等的,即将这公式(1.40)和(1.41)写成矩阵形式,得到:(1.42)公式(1.42)建立起这段小质量块两边的压力和速度的关系。管道中小段质量块后端的压力和速度可以用它前端的压力和速度来表示。也就是说质量块后端与前端之间建立起来一种传递关系。同样对一个长度为L的管道(如图1.4所示)也可以得到管道两端的传递关系。在=处的压力和速度可以通过公式(1.6)和(1.9)分别求得(1.13)由以上两式可以得到和,如下:45(1.46根据公式(6)和(9),在处的压力和速度分别为将公式(1.45)和(1.46)中和的表达式代入公式(1.47)和(1.48)之中,就得到管道入冂与出∏之间声压和速度之间的关系,为:+49将公式(1.49)和(1.50)写成如下的矩阵形式第一章管道声学这样就得到了管道两边的压力和速度的传递关系。公式(1.51)可以简单地写成如下形式式中,被称为传递矩阵。如果管道的传递矩阵知道,那么只要知道管道端的压力和速度,就可以通过传递矩阵算出另一端的压力和速度。在传递矩阵两边分别是两个输入参数和两个输出参数。这四个参数的关系由传递矩阵来确定,因此这种表达方式称为四端网络法。上面介绍了小段质量和长度为L的管道的传递矩阵表达方法。这种方法可以推广到任何一个声学元件,其输入端和输出端的声压和速度都可以用四端网络米表示。图1.12代表某个声学元件i。图1.12一个管道元件的四端网终图这个元件两边的压力和速度关系为式中是传递矩阵,是传递矩阵系数。汽车的进气系统包括进气管道、空气过滤器、赫耳姆兹消音器、四分之波长管等。排气系统包括排气多支管、催化器、谐振器、消音器和管道等。一个系统如果由N个元件组成。而且每个元件的传递矩阵都知道,那么出声口的声压和速度就可以用声源的声压和速度来表示如下形式:(1.54)式中的L1是系统的传递矩阵,如下形式(1.55)
    2020-12-05下载
    积分:1
  • eclipse下SpringMVC+Maven+Mybatis+MySQL项目搭建
    eclipse下SpringMVC+Maven+Mybatis+MySQL项目搭建
    2021-05-06下载
    积分:1
  • NGSIM使用手册(1)
    美国NGSIM系统的使用手册,方便读者高效的利用NGSIM进行数据下载,完成交通领域的研究Technical Report Documentation Page1. Report No2. Government Accession no3. Recipients Catalog NoFHWA-HOP-06-0124. Title and subtitle5. Report DateNext Generation Simulation(NGSIM) Data Format Planly20046. Performing Organization Code7. Author(s8. Performing Organization report noVijay Kovvali, richard margiotta, Robert franc, vassiliAlexiadis9. Performing Organization Name and Address10. Work Unit NoCAMBRIDGE SYSTEMATIC INC150 CAMBRIDGE PARK DRIVE SUITE 400011. Contract or grant noCAMBRIDGE MA 02140DTFH61-02-C-0003612. Sponsoring Agency Name and Address13. Type of Report and Period CoveredDepartment of transportationFinal reportFederal Highway AdministrationJuly 2003-july 2004Office of Acquisition Management14. Sponsoring Agency Code400 Seventh Street SW, RM 4410Washington, DC 2059015. Supplementary notesFHWA COTR: John Halkias, Office of Operations, and James Colyar, Office of Operations r&d16. AbstractThe Next Generation Simulation Program(NGSIM) Data Format Plan was developed to define thestructure, documentation, and transfer requirements for data that will be collected for estimationcalibration, and validation of core behavioral algorithms. The development of the data Format Plan isbased on existing formats that are relevant to ngsim and augmented to fill in gaps. to this end, a reviewof existing data formats was undertaken and their relevance to NGSiM was assessed. The review includeddata standards developed for intelligent transportation systems(ITS), data formats developed specificallyfor traffic simulation models, and data formats developed for broader transportation applications. Thespecified data formats were developed with the objective of promoting efficient research by maintainingonsistency between data collection and research, and providing consistent storage and transmittalprotocols. On the other hand, this plan intentionally avoids over specification of data formats, so as tominimize unnecessary limitations to research. This document specifies the conceptual data model by meansof Unified Modeling Language UMl class diagrams; the data dictionary in the data standard prescribed bP1489-1999 format developed by the Institute of Electrical and Electronics Engineers(IEEE); the dataexchange structure for data transfer from user to user or from the database/repository to users; and theNGSIM metadata17. Key words1 8. Distribution StatementNext generation simulation, NGSIM, trafficNo restrictions. This document is available to thesimulation, high-level plan, traffic data collection, public through the National Technical Informationvehicle trajectory dataService, Springfield, VA2216119. Security Classif. (of this report) 20. Security Classif. (of this page) 21. No of Pages22. PriceUnclassifiedUnclassifiedForm dot e1700.7(8-72)Reproduction of completed pages authorizedTABLE OF CONTENTSEXECUTIVE SUMMARY1.0 INTRODUCTION1.1High- Level plan context……垂垂垂垂·着垂垂垂垂非垂·非垂垂看垂音非非;·垂垂音看垂看垂1.2 Background1.3 Data Collection Types……1344581. 4 Data Conversion1.5 Data Formats·····.···············.··.···.·;···..·.··..·.···2.0 NGSIM DATA REQUIREMENTS22 Microsimulation Software Data format,…………172.1 NGSIM Data…192.3 Rcquirements for NgsiM data Collection..................193.0 RECOMMENDED NGSIM DATA FORMATS..m. 233.1 NGSIM Data model233.2 NGSIM Data Dictionary……………243.3 NGSIM Metadata.............................253.4 NGSIM Data Exchange Format273.5 File and Directory Naming Convention……293.6 Summary30REFERENCES31APPENDIX A-REVIEW OF EXISTING TRANSPORTATION DATA FORMATS3APPENDIX B-ACCURACY REQUIREMENTS FOR NGSIM DATACOLLECTION,45APPENDIX C-DATA MODEL∴….,,53APPENdIXD-DATA DICTIONARY.APPENDIX E-METADATA. ...........................................................................................99APPENdIX F-SYSTEM-STATE DATA看香音看音香n117List of FiguresFigure 1 Diagram. NGSIM task interdependencies4Figure2. Diagran. Data format classification relevant to ngsim1………Figure 3. Diagram. Top level data model of general traffic simulation55Figure4. Diagram. Influencing factors database packages………………56Figure 5. Diagram. Behavioral models packages57Figure6. Diagran. Facility type generalization…………18Figure 7. Diagram. Traffic management systems generalization......59Figure 8. Diagram. Transit management systems generalizationFigure9. Diagran. nvironment generalization.………………………0Figure 10. Diagram NTCIP Controller class diagram61Figure 11 Diagram Actuated traffic signal controller generalization2Figure12 Diagram. Generalized microsimulation data model………………63Figure 13 Diagram Data concept components and constructs(IEEE Std 1489-1999)66List of tablesTable 1. Example validation data by algorithm categoryTable 2. Summary of NGSiM categorizations for data formatsTable 3. Accuracy requirements for vehicle trajectory data. ..45Table 4. Accuracy requirements for instrumented vehicle data.........46Table 5. Accuracy requirements for wide-area detector data......... 47Table 6. Accuracy requirements for nctwork-rclated data48Table 7. Accuracy requirements for representative transportation managementsystems data52Table 8. Terminology for UMLmodeler54Table 9. Data dictionary for NgSim.67Table 10 processing documentation metadata for ngsimwwwwwm116Table1l. Requisite vehicle trajectory data…………………………117Table 12. requisite wide-area detector data requirements……118EXECUTIVE SUMMARYThe Next Generation Simulation Program(NGsim) Data Format plan was developed todefine the structure, documentation, and transfer requirements for data that will be col-lected for estimation, calibration, and validation of core behavioral algorithms. Thedevelopment of the data format plan is based on existing formats that are relevant toNGSIM and augmented to fill in gaps. To this end, a review of existing data formats wasundertaken and their relevance to ngsim was assessed. The review included data standards developed for intelligent transportation systems (ITS), data formats developed spe-cifically for traffic simulation models and data formats developed for broader transporta-tion applications. The specified data formats were developed with the objective of pro-moting efficient research by maintaining consistency between data collection andresearch, and providing consistent storage and transmittal protocols. On the other handthis plan intentionally avoids overspecification of data formats, so as to minimize unnecessary limitations to researchFour data format components were specified in this document, including: 1)data model,2)data dictionary, 3 )metadata, and 4) data exchange formatNGSIM Data Model- The conceptual data model for NGSIM data formats is pre-sented by means of Unified Modeling Language() class diagrams. Used in con-junction with the data dictionary, the data model allows for construction of a formaldatabase/repository for NGSIM validation dataNGSIM Data Dictionary This provides definition of individual data elementsrequired by NGsim. It follows the data standard prescribed by P1489-1999 formatdeveloped by the Institutc of Elcctrical and Electronics Engineers(ieee)NGSIM Data Exchange Format- The data cxchange structure dcfincs how datashould be transferred from user to user or from the database /repository to users. Thisdocument specifies the framework for developing data exchange formats by providingthe data model and the data dictionary; it also provides clear guidance on the formatstandards with which the data exchange format should conform Currently it doesnot provide specific schema for the data exchange formatsNGSIM Metadata- This includes both traditional metadata(definitions, specificationsand valid value lists for data elements and general information about the dataset andits availability); and processing metadata(what has happened to the data from data col-lection to data archival). Administrative metadata formats were adapted fromContent Standard for Digital Geospatial Metadata(FGDC-STD-001-1998), developedby the Federal Geographic Data Committee(FGDC). Recommendations for NGSiMprocessing metadata are based on the guidance provided in ASTM E2259-03, devel-oped by the American Society for Testing and Materials(ASTm)1.0 INTRODUCTIONThe objectives of the NGsim program include the followingDevelopment of a core set of open behavioral algorithms in support of traffic simulation with a primary focus on microscopic modelingCollection of extensive data that will be used for estimation calibration and validationof the core behavioral algorithms; and storing the data in a repository that can be uni-versally accessedThe High-Level Plan for DatasetsTask E3)identified different kinds of traffic data col-lection methods and technologies and recommended three kinds of data collection effortsfor ngsim, including vehicle trajectory data wide area detector data and instrumentedvehicle dataThis report Task F)presents the documentation, format structure, and transfer requirements for the ngsim data formats for these data collection efforts identified in task e3This report is organized as followsExecutive Summary -Provides an executive summary of this documentSection1.0-Provides an overview and introduction to this report, including the con-text of the data format plan within NGsIM, information on NGsim data collection anddata types, information on data conversion, general information on data formats, anda summary of available transportation data formats and their relevance for ngsimSection 2.0-Presents definitions and categorization for different data types, and pro-vides ngsim data requirementsSection 3.0-Presents data format recommendations for the NGsim program,including a data model, data elements for the data dictionary, metadata to describe thedata collection effort and data exchange formatsReferences-Presents references used in developing this data format planAppendix a-Presents a review of existing transportation data formatsAppendix B-Presents accuracy requirements for NGSiM data collectionAppendix C- Presents a UML representation of the ngsim data modelAppendix D-Presents a high-level NGSIM data dictionaryAppendix E- Presents metadata categories, dictionary, and recommended metadataformats for ngsim1.1 HIGH-LEVEL PLAN CONTEXTInterdependencies among NGSIM tasks are shown in figure 1. The High-Level Plan forDatasets(Task E. 3) presents an assessment of existing datasets of potential use for NGSIM,and makes recommendations on the focus for nGsim data collection methodologies. Thisreport on the data Format Plan task f) provides recommendations on the data exchangeformat(s) for NGSIM data collection efforts. The data formats are also influenced by theHigh-Level Verification and Validation Plan(task e 2)Task E 1-1Core algorithmAssessmentTask e,3Task e.1-2Task e2High-LevelCore AlgorithmHigh-Level Verificationlan for DatasetsPlanandⅤ alidation planTask eData format planFigure 1 Diagram. NGSIM task interdependencies.1.2 BACKGROUNDThe NGSiM field data collection effort pursues data required for developing, estimating,calibrating and validating traffic behavioral algorithms. Tactical route execution, opera-tional driving, and en-route strategic traveler behaviors were identified as the focus of theNGSIM core behavioral algorithm research in the identification and prioritization of coreAlgorithms Task D)report. The High-Level Verification and Validation Plan(task e2)provides an example of the data collection datasets for each algorithm category as shownin table 1. the table illustrates the extent over which data must be collected for each levelof algorithm. For example, for operational driving algorithms, a single stretch of roadwayon a freeway will likely be sufficient, while, for development of tactical driving algo-rithms, the data collection effort should be expanded to include the freeway section andmultiple entry and exit ramps that feed the freeway. The data formats developed in thisplan address the data, both static and dynamic, that are pertinent to the data collectionefforts necessary for developing and validating all three categories of driver behavioralalgorithms4
    2020-12-05下载
    积分:1
  • 无线通信(Wireless Communication by A.Goldsmith).pdf
    【实例简介】it is helpful to the people relating to the communication scope.
    2021-11-14 00:44:27下载
    积分:1
  • 数学分析习课讲义.
    对于学习考研有很大帮助.目录中有连接,点击即可翻页,使用方便.
    2020-12-07下载
    积分:1
  • vb.net数据曲线显示
    vb.net 的一个小程序,以前一个项目上用的.可根据数据显示曲线,鼠标移动显示.
    2020-12-01下载
    积分:1
  • 通信原理MATLAB仿真实验指导书V2.0林志谋
    通信原理MATLAB仿真实验指导书V2.0林志谋 通信原理MATLAB仿真实验指导书 ,采用MATLAB SIMULINK 仿真2ASK,2PSK,2FSK,AM,DSB,SSB,以及PCM编码解码,差错控制编码等等,还用SIMULINK仿真了CDMA通信系统。
    2020-12-08下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载