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; see the file COPYING. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 */
21
22
23#include "c_microstrip.h"
24#include "transline.h"
25#include "units.h"
26
27
29{
30 m_Name = "Coupled_MicroStrip";
31 Init();
32}
33
34
36{
37 m_calc.Analyse();
38}
39
40
45
46
48{
49 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
50 m_calc.GetAnalysisResults();
51
55
57 setResult( 1, results[TRANSLINE_PARAMETERS::EPSILON_EFF_ODD].first, "" );
58 setResult( 2, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_EVEN].first, "ps/cm" );
59 setResult( 3, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_ODD].first, "ps/cm" );
60 setResult( 4, results[TRANSLINE_PARAMETERS::ATTEN_COND_EVEN].first, "dB" );
61 setResult( 5, results[TRANSLINE_PARAMETERS::ATTEN_COND_ODD].first, "dB" );
64 setResult( 8, results[TRANSLINE_PARAMETERS::SKIN_DEPTH].first / UNIT_MICRON, "µm" );
65 setResult( 9, results[TRANSLINE_PARAMETERS::Z_DIFF].first, "Ω" );
66
73}
74
75
77{
78 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
79 m_calc.GetAnalysisResults();
80
84
86 setResult( 1, results[TRANSLINE_PARAMETERS::EPSILON_EFF_ODD].first, "" );
87 setResult( 2, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_EVEN].first, "ps/cm" );
88 setResult( 3, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_ODD].first, "ps/cm" );
89 setResult( 4, results[TRANSLINE_PARAMETERS::ATTEN_COND_EVEN].first, "dB" );
90 setResult( 5, results[TRANSLINE_PARAMETERS::ATTEN_COND_ODD].first, "dB" );
93 setResult( 8, results[TRANSLINE_PARAMETERS::SKIN_DEPTH].first / UNIT_MICRON, "µm" );
94 setResult( 9, results[TRANSLINE_PARAMETERS::Z_DIFF].first, "Ω" );
95
102}
103
104
126
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:87
void setResult(int, double, const char *)
double m_parameters[EXTRA_PRMS_COUNT]
Definition transline.h:133
virtual void getProperties()
@function getProperties
const char * m_Name
Definition transline.h:86
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 setErrorLevel(PRMS_ID, char)
@function setErrorLevel
#define UNIT_MICRON
@ SIGMA_PRM
Definition transline.h:71
@ SKIN_DEPTH_PRM
Definition transline.h:72
@ Z0_O_PRM
Definition transline.h:56
@ FREQUENCY_PRM
Definition transline.h:53
@ T_PRM
Definition transline.h:48
@ Z0_E_PRM
Definition transline.h:55
@ MURC_PRM
Definition transline.h:52
@ TAND_PRM
Definition transline.h:42
@ PHYS_LEN_PRM
Definition transline.h:62
@ ANG_L_PRM
Definition transline.h:57
@ H_T_PRM
Definition transline.h:46
@ ROUGH_PRM
Definition transline.h:49
@ EPSILONR_PRM
Definition transline.h:41
@ PHYS_S_PRM
Definition transline.h:60
@ H_PRM
Definition transline.h:44
@ PHYS_WIDTH_PRM
Definition transline.h:58