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; see the file COPYING. If not, write to
21 * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23 */
24
25
26#include "coplanar.h"
27#include "units.h"
28
29
31{
32 m_Name = "CoPlanar";
33 Init();
34}
35
36
41
42
44{
46
50 pushSoldermaskParameters( m_calc, /* aIncludeFillsGaps */ true );
63
64 // Ungrounded CPW. The grounded subclass overrides this to flip the flag.
66
68 m_calc.SetSynthesizeTarget( TRANSLINE_PARAMETERS::PHYS_WIDTH );
69 else if( isSelected( PHYS_S_PRM ) )
70 m_calc.SetSynthesizeTarget( TRANSLINE_PARAMETERS::PHYS_S );
71}
72
73
79
80
82{
83 m_calc.Analyse();
84}
85
86
91
92
94{
95 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
96 m_calc.GetAnalysisResults();
97
100
107}
108
109
111{
112 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
113 m_calc.GetSynthesisResults();
114
117
118 if( isSelected( PHYS_S_PRM ) )
120
122
129}
130
131
133{
134 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
135 m_calc.GetAnalysisResults();
136
137 setResult( 0, results[TRANSLINE_PARAMETERS::EPSILON_EFF].first, "" );
138 setResult( 1, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY].first, "ps/cm" );
139 setResult( 2, results[TRANSLINE_PARAMETERS::LOSS_CONDUCTOR].first, "dB" );
140 setResult( 3, results[TRANSLINE_PARAMETERS::LOSS_DIELECTRIC].first, "dB" );
141 setResult( 4, results[TRANSLINE_PARAMETERS::SKIN_DEPTH].first / UNIT_MICRON, "µm" );
142}
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:76
void setResult(int, double, const char *)
double m_parameters[EXTRA_PRMS_COUNT]
Definition transline.h:142
virtual void getProperties()
@function getProperties
const char * m_Name
Definition transline.h:93
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:71
@ DIELECTRIC_MODEL_PRM
Definition transline.h:77
@ EPSILONR_SPEC_FREQ_PRM
Definition transline.h:78
@ SKIN_DEPTH_PRM
Definition transline.h:72
@ FREQUENCY_PRM
Definition transline.h:53
@ T_PRM
Definition transline.h:48
@ MURC_PRM
Definition transline.h:52
@ Z0_PRM
Definition transline.h:54
@ TAND_PRM
Definition transline.h:42
@ PHYS_LEN_PRM
Definition transline.h:62
@ ANG_L_PRM
Definition transline.h:57
@ 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