KiCad PCB EDA Suite
Loading...
Searching...
No Matches
c_microstrip.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002 Claudio Girardi <[email protected]>
3 * Copyright (C) 2005, 2006 Stefan Jahn <[email protected]>
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this package. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20
21#include "c_microstrip.h"
22#include "transline.h"
23#include "units.h"
24
25
27{
28 m_Name = "Coupled_MicroStrip";
29 Init();
30}
31
32
34{
35 m_calc.Analyse();
36}
37
38
43
44
46{
47 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
48 m_calc.GetAnalysisResults();
49
53
55 setResult( 1, results[TRANSLINE_PARAMETERS::EPSILON_EFF_ODD].first, "" );
56 setResult( 2, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_EVEN].first, "ps/cm" );
57 setResult( 3, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_ODD].first, "ps/cm" );
58 setResult( 4, results[TRANSLINE_PARAMETERS::ATTEN_COND_EVEN].first, "dB" );
59 setResult( 5, results[TRANSLINE_PARAMETERS::ATTEN_COND_ODD].first, "dB" );
62 setResult( 8, results[TRANSLINE_PARAMETERS::SKIN_DEPTH].first / UNIT_MICRON, "µm" );
63 setResult( 9, results[TRANSLINE_PARAMETERS::Z_DIFF].first, "Ω" );
64
71}
72
73
75{
76 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
77 m_calc.GetAnalysisResults();
78
82
84 setResult( 1, results[TRANSLINE_PARAMETERS::EPSILON_EFF_ODD].first, "" );
85 setResult( 2, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_EVEN].first, "ps/cm" );
86 setResult( 3, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_ODD].first, "ps/cm" );
87 setResult( 4, results[TRANSLINE_PARAMETERS::ATTEN_COND_EVEN].first, "dB" );
88 setResult( 5, results[TRANSLINE_PARAMETERS::ATTEN_COND_ODD].first, "dB" );
91 setResult( 8, results[TRANSLINE_PARAMETERS::SKIN_DEPTH].first / UNIT_MICRON, "µm" );
92 setResult( 9, results[TRANSLINE_PARAMETERS::Z_DIFF].first, "Ω" );
93
100}
101
102
104{
106
126}
127
void show_results() override
Shows results.
void calcAnalyze() override
Computation for analysis.
void getProperties() override
@function getProperties
void showAnalyze() override
Shows synthesis results and checks for errors / warnings.
void showSynthesize() override
Shows analysis results and checks for errors / warnings.
void calcSynthesize() override
Computation for synthesis.
COUPLED_MICROSTRIP m_calc
void Init()
Definition transline.cpp:74
void setResult(int, double, const char *)
double m_parameters[EXTRA_PRMS_COUNT]
Definition transline.h:140
virtual void getProperties()
@function getProperties
const char * m_Name
Definition transline.h:91
static char convertParameterStatusCode(TRANSLINE_STATUS aStatus)
Converts a TRANSLINE_PARAMETER status to a PCB Calculation status.
void setProperty(enum PRMS_ID aPrmId, double aValue)
void pushSoldermaskParameters(TRANSLINE_CALCULATION_BASE &aCalc, bool aIncludeFillsGaps=false) const
Push the mask-eligible subset of soldermask parameters (PRESENT, THICKNESS, EPSILONR,...
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
#define UNIT_MICRON
@ SIGMA_PRM
Definition transline.h:69
@ DIELECTRIC_MODEL_PRM
Definition transline.h:75
@ EPSILONR_SPEC_FREQ_PRM
Definition transline.h:76
@ SKIN_DEPTH_PRM
Definition transline.h:70
@ Z0_O_PRM
Definition transline.h:54
@ FREQUENCY_PRM
Definition transline.h:51
@ T_PRM
Definition transline.h:46
@ Z0_E_PRM
Definition transline.h:53
@ MURC_PRM
Definition transline.h:50
@ TAND_PRM
Definition transline.h:40
@ PHYS_LEN_PRM
Definition transline.h:60
@ ANG_L_PRM
Definition transline.h:55
@ H_T_PRM
Definition transline.h:44
@ ROUGH_PRM
Definition transline.h:47
@ EPSILONR_PRM
Definition transline.h:39
@ PHYS_S_PRM
Definition transline.h:58
@ H_PRM
Definition transline.h:42
@ PHYS_WIDTH_PRM
Definition transline.h:56