2011-08-05 19:53:42 +00:00
|
|
|
/*
|
|
|
|
* transline.h - base for a transmission line class definition
|
|
|
|
*
|
|
|
|
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
|
2018-06-07 13:30:35 +00:00
|
|
|
* Modifications 2018 for Kicad: Jean-Pierre Charras
|
2011-08-05 19:53:42 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this package; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __TRANSLINE_H
|
|
|
|
#define __TRANSLINE_H
|
|
|
|
|
|
|
|
// IDs for lines parameters used in calculation:
|
|
|
|
// (Used to retrieve these parameters from UI.
|
|
|
|
// DUMMY_PRM is used to skip a param line in dialogs. It is not really a parameter
|
|
|
|
enum PRMS_ID
|
|
|
|
{
|
|
|
|
UNKNOWN_ID = 0,
|
|
|
|
EPSILONR_PRM,
|
|
|
|
TAND_PRM,
|
|
|
|
RHO_PRM,
|
|
|
|
H_PRM,
|
|
|
|
TWISTEDPAIR_TWIST_PRM,
|
|
|
|
H_T_PRM,
|
|
|
|
STRIPLINE_A_PRM,
|
|
|
|
T_PRM,
|
|
|
|
ROUGH_PRM,
|
|
|
|
MUR_PRM,
|
|
|
|
TWISTEDPAIR_EPSILONR_ENV_PRM,
|
|
|
|
MURC_PRM,
|
|
|
|
FREQUENCY_PRM,
|
|
|
|
Z0_PRM,
|
|
|
|
Z0_E_PRM,
|
|
|
|
Z0_O_PRM,
|
|
|
|
ANG_L_PRM,
|
|
|
|
PHYS_WIDTH_PRM,
|
|
|
|
PHYS_DIAM_IN_PRM,
|
|
|
|
PHYS_S_PRM,
|
|
|
|
PHYS_DIAM_OUT_PRM,
|
|
|
|
PHYS_LEN_PRM,
|
|
|
|
DUMMY_PRM
|
|
|
|
};
|
|
|
|
|
|
|
|
class TRANSLINE
|
|
|
|
{
|
|
|
|
public: TRANSLINE();
|
|
|
|
virtual ~TRANSLINE();
|
|
|
|
|
2018-06-07 13:44:20 +00:00
|
|
|
const char *m_Name;
|
2011-08-05 19:53:42 +00:00
|
|
|
void setProperty( enum PRMS_ID aPrmId, double aValue);
|
|
|
|
double getProperty( enum PRMS_ID aPrmId );
|
|
|
|
void setResult( int, double, const char* );
|
|
|
|
void setResult( int, const char* );
|
|
|
|
bool isSelected( enum PRMS_ID aPrmId );
|
|
|
|
|
|
|
|
virtual void synthesize() { };
|
|
|
|
virtual void analyze() { };
|
|
|
|
|
|
|
|
protected:
|
2018-06-07 13:18:56 +00:00
|
|
|
double m_freq; // Frequency of operation
|
2011-08-05 19:53:42 +00:00
|
|
|
double er; /* dielectric constant */
|
2018-06-07 13:44:20 +00:00
|
|
|
double m_tand; // Dielectric Loss Tangent
|
2018-06-07 13:30:35 +00:00
|
|
|
double m_sigma; // Conductivity of the metal
|
2018-06-07 13:44:20 +00:00
|
|
|
double m_murC; // magnetic permeability of conductor
|
2018-06-07 13:30:35 +00:00
|
|
|
double m_skindepth; // Skin depth
|
2018-06-07 13:18:56 +00:00
|
|
|
|
2011-08-05 19:53:42 +00:00
|
|
|
double skin_depth();
|
|
|
|
void ellipke( double, double&, double& );
|
|
|
|
double ellipk( double );
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __TRANSLINE_H */
|