mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
pcb_calculator, STRIPLINE: fix incorrect formula for conductor loss.
This commit is contained in:
parent
e972fb42ee
commit
fc9795e95d
@ -30,9 +30,6 @@
|
||||
#include "stripline.h"
|
||||
#include "units.h"
|
||||
|
||||
// const to convert a attenuation / loss from log to decibel
|
||||
const double LOG2DB = 20.0 / log( 10.0 );
|
||||
|
||||
STRIPLINE::STRIPLINE() : TRANSLINE()
|
||||
{
|
||||
m_Name = "StripLine";
|
||||
@ -41,7 +38,7 @@ STRIPLINE::STRIPLINE() : TRANSLINE()
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// calculate characteristic impedance and conductor loss (in log/meter)
|
||||
// calculate characteristic impedance and conductor loss (in db/meter)
|
||||
double STRIPLINE::lineImpedance( double height, double& ac )
|
||||
{
|
||||
double ZL;
|
||||
@ -98,7 +95,7 @@ void STRIPLINE::calcAnalyze()
|
||||
m_parameters[Z0_PRM] = 2.0
|
||||
/ ( 1.0 / lineImpedance( 2.0 * a + t, ac1 )
|
||||
+ 1.0 / lineImpedance( 2.0 * ( h - a ) - t, ac2 ) );
|
||||
m_parameters[LOSS_CONDUCTOR_PRM] = LOG2DB * m_parameters[PHYS_LEN_PRM] * ( ac1 + ac2 );
|
||||
m_parameters[LOSS_CONDUCTOR_PRM] = m_parameters[PHYS_LEN_PRM] * ( ac1 + ac2 );
|
||||
m_parameters[LOSS_DIELECTRIC_PRM] = LOG2DB * m_parameters[PHYS_LEN_PRM]
|
||||
* ( M_PI / C0 ) * m_parameters[FREQUENCY_PRM]
|
||||
* sqrt( m_parameters[EPSILONR_PRM] )
|
||||
|
@ -61,6 +61,10 @@ inline double atanh( double x )
|
||||
#define C0 299792458.0 // speed of light in vacuum
|
||||
#define ZF0 376.730313668 // wave resistance in vacuum
|
||||
|
||||
// const to convert a attenuation / loss from log (Neper) to decibel
|
||||
// (1 Np = 8.68589 dB)
|
||||
const double LOG2DB = 20.0 / log( 10.0 );
|
||||
|
||||
// ZF0 value update:
|
||||
// https://physics.nist.gov/cgi-bin/cuu/Value?z0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user