⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dec3filter2.h

📁 各种工程计算的库函数
💻 H
字号:
/*    Decimation filter for rate 3    Copyright (C) 2002 Jussi Laako    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    Specification:    F1 = 0.15    F2 = 0.16667    Passband Ripple = 0.5dB    Stopband Ripple = 72dB*/#ifdef _MSC_VER#pragma warning(disable:4305)#endifstatic const long lDec3FilterLen = 269l;static const float fDec3FilterGain = 1.0f;static const float fpDec3FilterCoeffs[] = {    1.4096372904008E-5,    6.20864138759773E-6,    -1.1962729404551E-5,    -2.3778279419585E-5,    -1.37988638657019E-5,    1.42982964890982E-5,    3.57611210679811E-5,    2.56583454617911E-5,    -1.41019848338753E-5,    -4.95645715823098E-5,    -4.25975916104745E-5,    9.86972330349088E-6,    6.4292642910095E-5,    6.52173292050969E-5,    1.07411756764564E-7,    -7.85777822549059E-5,    -9.37833399642397E-5,    -1.7655835525004E-5,    9.05491555062634E-5,    0.000128095280529279,    4.4599340609907E-5,    -9.78329041648437E-5,    -0.000167358149248424,    -8.26081518714629E-5,    9.75912356810728E-5,    0.000210066418135909,    0.000133021622317071,    -8.66056523613292E-5,    -0.000253911694810618,    -0.000196651646121069,    6.1407475603902E-5,    0.000295724989629861,    0.00027357634309151,    -1.84561614124296E-5,    -0.000331464146959595,    -0.000362935731804699,    -4.56371428365029E-5,    0.000356255708620847,    0.000462742768716115,    0.000133846612821439,    -0.000364498414627643,    -0.000569724116403903,    -0.00024843842203411,    0.000350032769301898,    0.00067920517388833,    0.000390659232116752,    -0.000306377724260953,    -0.000785053156055708,    -0.000560421275268845,    0.000227031722387706,    0.000879690300667851,    0.000756000752341839,    -0.000105831325587101,    -0.000954186623634888,    -0.000973767333923201,    -6.26433305530141E-5,    0.000998438113774386,    0.00120796255638057,    0.000282630668000598,    -0.00100143199873018,    -0.0014505437201697,    -0.00055673483320841,    0.00095159592487695,    0.00169110744617701,    0.000885477472904616,    -0.000837222826838131,    -0.00191690330465025,    -0.00126687461894528,    0.000646958204700424,    0.00211294292648631,    0.00169605864878857,    -0.000370331787776399,    -0.00226220379715888,    -0.00216496304557647,    -1.68854662082256E-6,    0.00234591958025032,    0.00266208348086279,    0.000476145920036037,    -0.00234394033095523,    -0.00317232229120777,    -0.00105757399938588,    0.00223513621360957,    0.00367691429794633,    0.00174753491673876,    -0.00199780692233268,    -0.00415341942405608,    -0.00254424267576005,    0.00161004497604152,    0.00457575041203517,    0.0034422967559576,    -0.00104998247996542,    -0.00491417972577139,    -0.00443254672984049,    0.000295824008691556,    0.0051352337843152,    0.0055021034584392,    0.00067447445104106,    -0.00520132592895121,    -0.00663450605464705,    -0.00188409376107094,    0.00506988365615844,    0.00781004660571238,    0.0033591541480259,    -0.00469155241522291,    -0.00900624699133973,    -0.00513203790842882,    0.00400672388255265,    0.0101984744288057,    0.00724736861721566,    -0.00293894622061084,    -0.0113606750456741,    -0.00977294137547623,    0.00138223980575868,    0.0124661982412304,    0.0128206286698581,    0.000824370577933274,    -0.0134886792341002,    -0.0165893640917177,    -0.00395177519413615,    0.0144029433334805,    0.021463049433415,    0.00851253006822971,    -0.0151858933651067,    -0.0282679100770945,    -0.0156304647552868,    0.0158173414863161,    0.0391074487429995,    0.0283611944633451,    -0.0162807483877078,    -0.0612003887785374,    -0.0589548036814126,    0.0165638365420887,    0.145252077169374,    0.266842355959178,    0.316588591101213,    0.266842355959178,    0.145252077169374,    0.0165638365420887,    -0.0589548036814126,    -0.0612003887785374,    -0.0162807483877078,    0.0283611944633451,    0.0391074487429995,    0.0158173414863161,    -0.0156304647552868,    -0.0282679100770945,    -0.0151858933651067,    0.00851253006822971,    0.021463049433415,    0.0144029433334805,    -0.00395177519413615,    -0.0165893640917177,    -0.0134886792341002,    0.000824370577933274,    0.0128206286698581,    0.0124661982412304,    0.00138223980575868,    -0.00977294137547623,    -0.0113606750456741,    -0.00293894622061084,    0.00724736861721566,    0.0101984744288057,    0.00400672388255265,    -0.00513203790842882,    -0.00900624699133973,    -0.00469155241522291,    0.0033591541480259,    0.00781004660571238,    0.00506988365615844,    -0.00188409376107094,    -0.00663450605464705,    -0.00520132592895121,    0.00067447445104106,    0.0055021034584392,    0.0051352337843152,    0.000295824008691556,    -0.00443254672984049,    -0.00491417972577139,    -0.00104998247996542,    0.0034422967559576,    0.00457575041203517,    0.00161004497604152,    -0.00254424267576005,    -0.00415341942405608,    -0.00199780692233268,    0.00174753491673876,    0.00367691429794633,    0.00223513621360957,    -0.00105757399938588,    -0.00317232229120777,    -0.00234394033095523,    0.000476145920036037,    0.00266208348086279,    0.00234591958025032,    -1.68854662082256E-6,    -0.00216496304557647,    -0.00226220379715888,    -0.000370331787776399,    0.00169605864878857,    0.00211294292648631,    0.000646958204700424,    -0.00126687461894528,    -0.00191690330465025,    -0.000837222826838131,    0.000885477472904616,    0.00169110744617701,    0.00095159592487695,    -0.00055673483320841,    -0.0014505437201697,    -0.00100143199873018,    0.000282630668000598,    0.00120796255638057,    0.000998438113774386,    -6.26433305530141E-5,    -0.000973767333923201,    -0.000954186623634888,    -0.000105831325587101,    0.000756000752341839,    0.000879690300667851,    0.000227031722387706,    -0.000560421275268845,    -0.000785053156055708,    -0.000306377724260953,    0.000390659232116752,    0.00067920517388833,    0.000350032769301898,    -0.00024843842203411,    -0.000569724116403903,    -0.000364498414627643,    0.000133846612821439,    0.000462742768716115,    0.000356255708620847,    -4.56371428365029E-5,    -0.000362935731804699,    -0.000331464146959595,    -1.84561614124296E-5,    0.00027357634309151,    0.000295724989629861,    6.1407475603902E-5,    -0.000196651646121069,    -0.000253911694810618,    -8.66056523613292E-5,    0.000133021622317071,    0.000210066418135909,    9.75912356810728E-5,    -8.26081518714629E-5,    -0.000167358149248424,    -9.78329041648437E-5,    4.4599340609907E-5,    0.000128095280529279,    9.05491555062634E-5,    -1.7655835525004E-5,    -9.37833399642397E-5,    -7.85777822549059E-5,    1.07411756764564E-7,    6.52173292050969E-5,    6.4292642910095E-5,    9.86972330349088E-6,    -4.25975916104745E-5,    -4.95645715823098E-5,    -1.41019848338753E-5,    2.56583454617911E-5,    3.57611210679811E-5,    1.42982964890982E-5,    -1.37988638657019E-5,    -2.3778279419585E-5,    -1.1962729404551E-5,    6.20864138759773E-6,    1.4096372904008E-5};static const double dDec3FilterGain = 1.0;static const double dpDec3FilterCoeffs[] = {    1.4096372904008E-5,    6.20864138759773E-6,    -1.1962729404551E-5,    -2.3778279419585E-5,    -1.37988638657019E-5,    1.42982964890982E-5,    3.57611210679811E-5,    2.56583454617911E-5,    -1.41019848338753E-5,    -4.95645715823098E-5,    -4.25975916104745E-5,    9.86972330349088E-6,    6.4292642910095E-5,    6.52173292050969E-5,    1.07411756764564E-7,    -7.85777822549059E-5,    -9.37833399642397E-5,    -1.7655835525004E-5,    9.05491555062634E-5,    0.000128095280529279,    4.4599340609907E-5,    -9.78329041648437E-5,    -0.000167358149248424,    -8.26081518714629E-5,    9.75912356810728E-5,    0.000210066418135909,    0.000133021622317071,    -8.66056523613292E-5,    -0.000253911694810618,    -0.000196651646121069,    6.1407475603902E-5,    0.000295724989629861,    0.00027357634309151,    -1.84561614124296E-5,    -0.000331464146959595,    -0.000362935731804699,    -4.56371428365029E-5,    0.000356255708620847,    0.000462742768716115,    0.000133846612821439,    -0.000364498414627643,    -0.000569724116403903,    -0.00024843842203411,    0.000350032769301898,    0.00067920517388833,    0.000390659232116752,    -0.000306377724260953,    -0.000785053156055708,    -0.000560421275268845,    0.000227031722387706,    0.000879690300667851,    0.000756000752341839,    -0.000105831325587101,    -0.000954186623634888,    -0.000973767333923201,    -6.26433305530141E-5,    0.000998438113774386,    0.00120796255638057,    0.000282630668000598,    -0.00100143199873018,    -0.0014505437201697,    -0.00055673483320841,    0.00095159592487695,    0.00169110744617701,    0.000885477472904616,    -0.000837222826838131,    -0.00191690330465025,    -0.00126687461894528,    0.000646958204700424,    0.00211294292648631,    0.00169605864878857,    -0.000370331787776399,    -0.00226220379715888,    -0.00216496304557647,    -1.68854662082256E-6,    0.00234591958025032,    0.00266208348086279,    0.000476145920036037,    -0.00234394033095523,    -0.00317232229120777,    -0.00105757399938588,    0.00223513621360957,    0.00367691429794633,    0.00174753491673876,    -0.00199780692233268,    -0.00415341942405608,    -0.00254424267576005,    0.00161004497604152,    0.00457575041203517,    0.0034422967559576,    -0.00104998247996542,    -0.00491417972577139,    -0.00443254672984049,    0.000295824008691556,    0.0051352337843152,    0.0055021034584392,    0.00067447445104106,    -0.00520132592895121,    -0.00663450605464705,    -0.00188409376107094,    0.00506988365615844,    0.00781004660571238,    0.0033591541480259,    -0.00469155241522291,    -0.00900624699133973,    -0.00513203790842882,    0.00400672388255265,    0.0101984744288057,    0.00724736861721566,    -0.00293894622061084,    -0.0113606750456741,    -0.00977294137547623,    0.00138223980575868,    0.0124661982412304,    0.0128206286698581,    0.000824370577933274,    -0.0134886792341002,    -0.0165893640917177,    -0.00395177519413615,    0.0144029433334805,    0.021463049433415,    0.00851253006822971,    -0.0151858933651067,    -0.0282679100770945,    -0.0156304647552868,    0.0158173414863161,    0.0391074487429995,    0.0283611944633451,    -0.0162807483877078,    -0.0612003887785374,    -0.0589548036814126,    0.0165638365420887,    0.145252077169374,    0.266842355959178,    0.316588591101213,    0.266842355959178,    0.145252077169374,    0.0165638365420887,    -0.0589548036814126,    -0.0612003887785374,    -0.0162807483877078,    0.0283611944633451,    0.0391074487429995,    0.0158173414863161,    -0.0156304647552868,    -0.0282679100770945,    -0.0151858933651067,    0.00851253006822971,    0.021463049433415,    0.0144029433334805,    -0.00395177519413615,    -0.0165893640917177,    -0.0134886792341002,    0.000824370577933274,    0.0128206286698581,    0.0124661982412304,    0.00138223980575868,    -0.00977294137547623,    -0.0113606750456741,    -0.00293894622061084,    0.00724736861721566,    0.0101984744288057,    0.00400672388255265,    -0.00513203790842882,    -0.00900624699133973,    -0.00469155241522291,    0.0033591541480259,    0.00781004660571238,    0.00506988365615844,    -0.00188409376107094,    -0.00663450605464705,    -0.00520132592895121,    0.00067447445104106,    0.0055021034584392,    0.0051352337843152,    0.000295824008691556,    -0.00443254672984049,    -0.00491417972577139,    -0.00104998247996542,    0.0034422967559576,    0.00457575041203517,    0.00161004497604152,    -0.00254424267576005,    -0.00415341942405608,    -0.00199780692233268,    0.00174753491673876,    0.00367691429794633,    0.00223513621360957,    -0.00105757399938588,    -0.00317232229120777,    -0.00234394033095523,    0.000476145920036037,    0.00266208348086279,    0.00234591958025032,    -1.68854662082256E-6,    -0.00216496304557647,    -0.00226220379715888,    -0.000370331787776399,    0.00169605864878857,    0.00211294292648631,    0.000646958204700424,    -0.00126687461894528,    -0.00191690330465025,    -0.000837222826838131,    0.000885477472904616,    0.00169110744617701,    0.00095159592487695,    -0.00055673483320841,    -0.0014505437201697,    -0.00100143199873018,    0.000282630668000598,    0.00120796255638057,    0.000998438113774386,    -6.26433305530141E-5,    -0.000973767333923201,    -0.000954186623634888,    -0.000105831325587101,    0.000756000752341839,    0.000879690300667851,    0.000227031722387706,    -0.000560421275268845,    -0.000785053156055708,    -0.000306377724260953,    0.000390659232116752,    0.00067920517388833,    0.000350032769301898,    -0.00024843842203411,    -0.000569724116403903,    -0.000364498414627643,    0.000133846612821439,    0.000462742768716115,    0.000356255708620847,    -4.56371428365029E-5,    -0.000362935731804699,    -0.000331464146959595,    -1.84561614124296E-5,    0.00027357634309151,    0.000295724989629861,    6.1407475603902E-5,    -0.000196651646121069,    -0.000253911694810618,    -8.66056523613292E-5,    0.000133021622317071,    0.000210066418135909,    9.75912356810728E-5,    -8.26081518714629E-5,    -0.000167358149248424,    -9.78329041648437E-5,    4.4599340609907E-5,    0.000128095280529279,    9.05491555062634E-5,    -1.7655835525004E-5,    -9.37833399642397E-5,    -7.85777822549059E-5,    1.07411756764564E-7,    6.52173292050969E-5,    6.4292642910095E-5,    9.86972330349088E-6,    -4.25975916104745E-5,    -4.95645715823098E-5,    -1.41019848338753E-5,    2.56583454617911E-5,    3.57611210679811E-5,    1.42982964890982E-5,    -1.37988638657019E-5,    -2.3778279419585E-5,    -1.1962729404551E-5,    6.20864138759773E-6,    1.4096372904008E-5};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -