29#include <wx/settings.h>
35#define INFINITY std::numeric_limits<double>::infinity()
40#define M_PI_2 ( M_PI / 2 )
89 wxColour wxcol = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
91 okCol.
r = wxcol.Red() / 255.0;
92 okCol.
g = wxcol.Green() / 255.0;
93 okCol.
b = wxcol.Blue() / 255.0;
250#define NR_EPSI 2.2204460492503131e-16
265 else if( std::isinf( arg ) && arg < 0 )
272 double a, b, c, fr, s, fk = 1, fe = 1, t, da = arg;
277 fk = 1 / sqrt( 1 - arg );
278 fe = sqrt( 1 - arg );
279 da = -arg / ( 1 - arg );
288 for( i = 0; i < iMax; i++ )
309 e =
M_PI_2 * ( 1 - s ) / a;
329#define MAX_ERROR 0.000001
348 double Z0_dest, Z0_current, Z0_result, angl_l_dest, increment, slope, error;
357 if( ( !std::isfinite( *aVar ) ) || ( *aVar == 0 ) )
373 error = fabs( Z0_dest - Z0_current );
378 increment = *aVar / 100.0;
387 slope = ( Z0_result - Z0_current ) / increment;
388 slope = ( Z0_dest - Z0_current ) / slope - increment;
398 error = fabs( Z0_dest - Z0_current );
400 if( iteration > 100 )
434 switch( aErrorLevel )
A color representation with 4 components: red, green, blue, alpha.
virtual void showSynthesize()
Shows analysis results and checks for errors / warnings.
bool isSelected(enum PRMS_ID aPrmId)
double getProperty(enum PRMS_ID aPrmId)
virtual void calcSynthesize()
Computation for synthesis.
void setResult(int, double, const char *)
bool minimizeZ0Error1D(double *)
@function minimizeZ0Error1D
double m_parameters[EXTRA_PRMS_COUNT]
void getProperties()
@function getProperties
void checkProperties()
@function checkProperties
virtual void synthesize()
void ellipke(double, double &, double &)
void setProperty(enum PRMS_ID aPrmId, double aValue)
virtual void showAnalyze()
Shows synthesis results and checks for errors / warnings.
double skin_depth()
@function skin_depth calculate skin depth
virtual void show_results()
Shows results.
virtual void calcAnalyze()
Computation for analysis.
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
void SetPropertyInDialog(enum PRMS_ID aPrmId, double value)
void SetPropertyBgColorInDialog(enum PRMS_ID aPrmId, const KIGFX::COLOR4D *aCol)
Function SetPropertyBgColorInDialog Set the background color of a parameter.
double GetPropertyInDialog(enum PRMS_ID aPrmId)
void SetResultInDialog(int line, const char *aText)
bool IsSelectedInDialog(enum PRMS_ID aPrmId)
void SetPropertyInDialog(enum PRMS_ID aPrmId, double value)
void SetPropertyBgColorInDialog(enum PRMS_ID aPrmId, const KIGFX::COLOR4D *aCol)
Function SetPropertyBgColorInDialog Set the background color of a parameter.
double GetPropertyInDialog(enum PRMS_ID aPrmId)
void SetResultInDialog(int line, const char *text)
bool IsSelectedInDialog(enum PRMS_ID aPrmId)
@ TWISTEDPAIR_EPSILONR_ENV_PRM
#define TRANSLINE_WARNING