KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_calculator/transline/coplanar.cpp
Go to the documentation of this file.
1/*
2 * coplanar.cpp - coplanar UI wrapper
3 *
4 * Copyright (C) 2008 Michael Margraf <[email protected]>
5 * Copyright (C) 2005, 2006 Stefan Jahn <[email protected]>
6 * Modified for Kicad: 2011 jean-pierre.charras
7 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or (at
12 * your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this package. If not, see <https://www.gnu.org/licenses/>.
21 */
22
23
24#include "coplanar.h"
25#include "units.h"
26
27
29{
30 m_Name = "CoPlanar";
31 Init();
32}
33
34
39
40
42{
44
48 pushSoldermaskParameters( m_calc, /* aIncludeFillsGaps */ true );
61
62 // Ungrounded CPW. The grounded subclass overrides this to flip the flag.
64
66 m_calc.SetSynthesizeTarget( TRANSLINE_PARAMETERS::PHYS_WIDTH );
67 else if( isSelected( PHYS_S_PRM ) )
68 m_calc.SetSynthesizeTarget( TRANSLINE_PARAMETERS::PHYS_S );
69}
70
71
77
78
80{
81 m_calc.Analyse();
82}
83
84
89
90
92{
93 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
94 m_calc.GetAnalysisResults();
95
98
105}
106
107
109{
110 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
111 m_calc.GetSynthesisResults();
112
115
116 if( isSelected( PHYS_S_PRM ) )
118
120
127}
128
129
131{
132 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
133 m_calc.GetAnalysisResults();
134
135 setResult( 0, results[TRANSLINE_PARAMETERS::EPSILON_EFF].first, "" );
136 setResult( 1, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY].first, "ps/cm" );
137 setResult( 2, results[TRANSLINE_PARAMETERS::LOSS_CONDUCTOR].first, "dB" );
138 setResult( 3, results[TRANSLINE_PARAMETERS::LOSS_DIELECTRIC].first, "dB" );
139 setResult( 4, results[TRANSLINE_PARAMETERS::SKIN_DEPTH].first / UNIT_MICRON, "µm" );
140}
void getProperties() override
Pushes back-metal flag and common UI parameters into the calculator.
void showAnalyze() override
Shows synthesis results and checks for errors / warnings.
void calcSynthesize() override
Computation for synthesis.
void showSynthesize() override
Shows analysis results and checks for errors / warnings.
void show_results() override
Shows results.
void calcAnalyze() override
Computation for analysis.
void getProperties() override
Pushes back-metal flag and common UI parameters into the calculator.
bool isSelected(enum PRMS_ID aPrmId)
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
@ FREQUENCY_PRM
Definition transline.h:51
@ T_PRM
Definition transline.h:46
@ MURC_PRM
Definition transline.h:50
@ Z0_PRM
Definition transline.h:52
@ TAND_PRM
Definition transline.h:40
@ PHYS_LEN_PRM
Definition transline.h:60
@ ANG_L_PRM
Definition transline.h:55
@ 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