KiCad PCB EDA Suite
Loading...
Searching...
No Matches
common/transline_calculations/coax.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2001 Gopal Narayanan <[email protected]>
3 * Copyright (C) 2002 Claudio Girardi <[email protected]>
4 * Copyright (C) 2005, 2006 Stefan Jahn <[email protected]>
5 * Modified for Kicad: 2018 Jean-Pierre Charras <jp.charras at wanadoo.fr>
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this package; see the file COPYING. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22 */
23
24#ifndef TRANSLINE_CALCULATIONS_COAX_H
25#define TRANSLINE_CALCULATIONS_COAX_H
26
27
28#include <string>
29
31
32
42{
44
45public:
55
57 void Analyse() override;
58
60 bool Synthesize( SYNTHESIZE_OPTS aOpts ) override;
61
68 {
69 if( aTarget == TCP::PHYS_DIAM_IN || aTarget == TCP::PHYS_DIAM_OUT )
70 m_synthesizeTarget = aTarget;
71 }
72
74 std::string GetTEModes() const { return m_teModes; }
75
77 std::string GetTMModes() const { return m_tmModes; }
78
79private:
81 void SetAnalysisResults() override;
82
84 void SetSynthesisResults() override;
85
87 double AlphaD() const;
88
90 double AlphaC() const;
91
93 void UpdateModeCutoffs();
94
96 std::string m_teModes;
97
99 std::string m_tmModes;
100};
101
102
103#endif // TRANSLINE_CALCULATIONS_COAX_H
std::string m_teModes
Cached TE_1m propagating-modes string produced by UpdateModeCutoffs.
void UpdateModeCutoffs()
Populates the TE / TM mode cutoff display strings and CUTOFF_FREQUENCY from current geometry.
std::string GetTEModes() const
Returns a UI-friendly string enumerating propagating TE_1m modes at the current frequency.
void SetAnalysisResults() override
Sets the output values and status following analysis.
TRANSLINE_PARAMETERS TCP
void SetSynthesizeTarget(TRANSLINE_PARAMETERS aTarget) override
Choose which geometry parameter will be solved for during synthesis.
double AlphaD() const
Dielectric loss per unit length, in dB/m.
std::string GetTMModes() const
Returns a UI-friendly string enumerating propagating TM_0m modes at the current frequency.
bool Synthesize(SYNTHESIZE_OPTS aOpts) override
Synthesize the cable geometry to match the given Z0 target.
std::string m_tmModes
Cached TM_0m propagating-modes string produced by UpdateModeCutoffs.
void Analyse() override
Analyse cable geometry parameters to output Z0, electrical length, losses and cutoffs.
void SetSynthesisResults() override
Sets the output values and status following synthesis.
double AlphaC() const
Conductor loss per unit length, in dB/m.
TRANSLINE_PARAMETERS m_synthesizeTarget
Which geometry parameter is the unknown during synthesis (set by the UI)
TRANSLINE_CALCULATION_BASE(std::initializer_list< TRANSLINE_PARAMETERS > aParameters)
Constructs the transmission line calculation object.
SYNTHESIZE_OPTS
Options for specifying synthesis inputs, targets, or strategies.
TRANSLINE_PARAMETERS
All possible parameters used (as inputs or outputs) by the transmission line calculations.