tag 标签: calculate

相关博文
  • 热度 20
    2010-5-24 09:14
    1771 次阅读|
    2 个评论
    The sample code is to check the correct gprmc format with the last chars, and try to calculate the checksum of gprmc. // parameters: // softuart_revbuf: the whole nmea string with header_char '$' and endchar_char 0x0a // softuart_revbuf_len: the length of this nmea string // return: // TRUE: right format; FALSE: bad string format with error end chars or checksum bool nmea_checksum(U8* softuart_revbuf, U32 softuart_revbuf_len) {             U8 checksum = 0;             U8 sum , nmea_sum ;             // "$GPRMC"             if( (softuart_revbuf =='R') (softuart_revbuf =='M') (softuart_revbuf =='C') ) {                 // check nmea data with length, and '*'0x0d0x0a as endchar                 if( (softuart_revbuf_len10) || (softuart_revbuf !=0x0d) || (softuart_revbuf !='*') ) {                     return FALSE;                                }                                 // checksum                 for(U32 i=1; i(softuart_revbuf_len-5); i++)                     checksum ^= softuart_revbuf ;                 nmea_sum = softuart_revbuf ;                 nmea_sum = softuart_revbuf ;                            copy_2xchar_1xchar(sum, nmea_sum, 1);                 if( checksum != sum ) {                     return FALSE;                 }            }            return TRUE; } Allen Zhan GV-TECH 2010.05.24
相关资源
  • 所需E币: 1
    时间: 2022-7-23 18:06
    大小: 1.74KB
    上传者: Argent
    FBCalculateDayOfWeek
  • 所需E币: 4
    时间: 2020-1-13 10:55
    大小: 3.68MB
    上传者: 238112554_qq
    公司内部资料-汽车电子EMC测试和设计基础,EMCBasicCalculate……
  • 所需E币: 5
    时间: 2020-1-13 18:23
    大小: 118.05KB
    上传者: wsu_w_hotmail.com
    AsimplemethodtocalculatepoweramplifierefficiencyversusoutputpowerproductforumAsimplemethodtocalculatepoweramplifierefficiencyversusoutputpowerLookingforanewmethodtosavevaluabledesigntime?ThisnewmethodallowsthedesignertoevaluateaPA’sefficiencywithoutactualbuildup.ByFrankDellaCortetransistors.Althoughnotnecessaryforthisdiscussion,aPAdesignerneedstoconsidertheoptimaloperatingpointforthePAtransistortoobtainmaximumefficiency.ForClass-ABmode,thePA’soutputpowercapabilityversusitsloadline(Rlcap)isgivenbythefollowingrelationship:Pcap=(Veff)2/2Rlcap,WhereVeff=Vcc-VsatOncetheloadlineisset,themaximumpowertransfer,hencemaximumPAefficiency,willoccurwhentheloadisequaltotheloadline.Thetypicalloadlinesfor3-voltPAsrunontheorderof2to5.Inpra……