From 2ade8031dcfa061b1b3bbd86c810628ca27a345c Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Mon, 12 Oct 2020 21:01:25 -0400 Subject: [PATCH] Clean up pcb_calculator includes a bit and rename files --- pcb_calculator/CMakeLists.txt | 2 +- pcb_calculator/attenuators.cpp | 2 +- .../attenuators/attenuator_classes.cpp | 5 +- pcb_calculator/board_classes_values.cpp | 6 +-- pcb_calculator/class_regulator_data.h | 2 + pcb_calculator/colorcode.cpp | 3 +- pcb_calculator/common_data.cpp | 2 +- pcb_calculator/datafile_read_write.cpp | 16 +++--- .../dialogs/pcb_calculator_frame_base.cpp | 2 +- .../dialogs/pcb_calculator_frame_base.fbp | 52 +++++++++---------- .../dialogs/pcb_calculator_frame_base.h | 2 +- pcb_calculator/electrical_spacing_values.cpp | 6 +-- pcb_calculator/eserie.cpp | 4 +- pcb_calculator/params_read_write.cpp | 9 ++-- pcb_calculator/pcb_calculator.cpp | 5 +- pcb_calculator/pcb_calculator_frame.cpp | 8 +-- ...cb_calculator.h => pcb_calculator_frame.h} | 13 +++-- pcb_calculator/regulators_funct.cpp | 8 +-- .../tracks_width_versus_current.cpp | 15 +++--- pcb_calculator/transline/c_microstrip.cpp | 8 +-- pcb_calculator/transline/coax.cpp | 18 +++---- pcb_calculator/transline/coplanar.cpp | 4 +- pcb_calculator/transline/microstrip.cpp | 6 +-- pcb_calculator/transline/rectwaveguide.cpp | 4 +- pcb_calculator/transline/stripline.cpp | 4 +- pcb_calculator/transline/transline.cpp | 4 +- pcb_calculator/transline/twistedpair.cpp | 24 ++++----- pcb_calculator/transline/units.h | 3 +- pcb_calculator/transline_dlg_funct.cpp | 7 ++- pcb_calculator/transline_ident.cpp | 6 +-- pcb_calculator/transline_ident.h | 2 +- pcb_calculator/via.cpp | 11 ++-- .../unit_selector.cpp} | 4 +- .../unit_selector.h} | 0 34 files changed, 134 insertions(+), 133 deletions(-) rename pcb_calculator/{pcb_calculator.h => pcb_calculator_frame.h} (98%) rename pcb_calculator/{UnitSelector.cpp => widgets/unit_selector.cpp} (98%) rename pcb_calculator/{UnitSelector.h => widgets/unit_selector.h} (100%) diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index dfe08f41eb..544fe67bd4 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -23,7 +23,7 @@ set( PCB_CALCULATOR_SRCS tracks_width_versus_current.cpp via.cpp transline_ident.cpp - UnitSelector.cpp + widgets/unit_selector.cpp transline/transline.cpp transline/c_microstrip.cpp transline/microstrip.cpp diff --git a/pcb_calculator/attenuators.cpp b/pcb_calculator/attenuators.cpp index 74f6930956..b2dc2e1476 100644 --- a/pcb_calculator/attenuators.cpp +++ b/pcb_calculator/attenuators.cpp @@ -27,9 +27,9 @@ */ #include -#include #include +#include "pcb_calculator_frame.h" extern double DoubleFromString( const wxString& TextValue ); diff --git a/pcb_calculator/attenuators/attenuator_classes.cpp b/pcb_calculator/attenuators/attenuator_classes.cpp index 3a4f964f92..ff026d0326 100644 --- a/pcb_calculator/attenuators/attenuator_classes.cpp +++ b/pcb_calculator/attenuators/attenuator_classes.cpp @@ -7,10 +7,11 @@ *****************************************************************************/ #include -#include #include #include -#include + +#include "attenuator_classes.h" +#include "pcb_calculator_settings.h" // Bitmaps: #include diff --git a/pcb_calculator/board_classes_values.cpp b/pcb_calculator/board_classes_values.cpp index 6d33dbe2b7..0e13eb3ba5 100644 --- a/pcb_calculator/board_classes_values.cpp +++ b/pcb_calculator/board_classes_values.cpp @@ -21,10 +21,8 @@ #include #include -#include -#include -#include -#include +#include "pcb_calculator_frame.h" +#include "units_scales.h" // A helper class to handle min values // Values are in meters. diff --git a/pcb_calculator/class_regulator_data.h b/pcb_calculator/class_regulator_data.h index 3caa352dd2..711ab337e7 100644 --- a/pcb_calculator/class_regulator_data.h +++ b/pcb_calculator/class_regulator_data.h @@ -33,6 +33,8 @@ #include +#include + // Helper class to store parameters for a regulator class REGULATOR_DATA { diff --git a/pcb_calculator/colorcode.cpp b/pcb_calculator/colorcode.cpp index 9cb365bbca..6e7ece0bf3 100644 --- a/pcb_calculator/colorcode.cpp +++ b/pcb_calculator/colorcode.cpp @@ -21,8 +21,7 @@ #include #include -#include -#include +#include "pcb_calculator_frame.h" void PCB_CALCULATOR_FRAME::OnToleranceSelection( wxCommandEvent& event ) { diff --git a/pcb_calculator/common_data.cpp b/pcb_calculator/common_data.cpp index 9c511e4bdf..36dac8e9c9 100644 --- a/pcb_calculator/common_data.cpp +++ b/pcb_calculator/common_data.cpp @@ -23,7 +23,7 @@ * @note lists of constants used in different panels */ -#include +#include "common_data.h" wxArrayString StandardRelativeDielectricConstantList() { diff --git a/pcb_calculator/datafile_read_write.cpp b/pcb_calculator/datafile_read_write.cpp index 74523929e9..90228c338a 100644 --- a/pcb_calculator/datafile_read_write.cpp +++ b/pcb_calculator/datafile_read_write.cpp @@ -22,15 +22,15 @@ * with this program. If not, see . */ -#include -#include -#include -#include -#include -#include -#include -#include #include +#include +#include +#include +#include +#include +#include +#include +#include using namespace PCBCALC_DATA_T; diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp index 1aea749631..fa9c89f64b 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp @@ -5,7 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "UnitSelector.h" +#include "widgets/unit_selector.h" #include "pcb_calculator_frame_base.h" diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp index 2d5b65450b..e972065592 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp @@ -8151,7 +8151,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -8340,7 +8340,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -8529,7 +8529,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -8718,7 +8718,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -8907,7 +8907,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -9096,7 +9096,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -9317,7 +9317,7 @@ 1 - UNIT_SELECTOR_FREQUENCY; UnitSelector.h + UNIT_SELECTOR_FREQUENCY; widgets/unit_selector.h 0 @@ -9767,7 +9767,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -10020,7 +10020,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -10273,7 +10273,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -10820,7 +10820,7 @@ 1 - UNIT_SELECTOR_RESISTOR; UnitSelector.h + UNIT_SELECTOR_RESISTOR; widgets/unit_selector.h 0 @@ -11009,7 +11009,7 @@ 1 - UNIT_SELECTOR_RESISTOR; UnitSelector.h + UNIT_SELECTOR_RESISTOR; widgets/unit_selector.h 0 @@ -11198,7 +11198,7 @@ 1 - UNIT_SELECTOR_ANGLE; UnitSelector.h + UNIT_SELECTOR_ANGLE; widgets/unit_selector.h 0 @@ -12444,7 +12444,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -12635,7 +12635,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h; Not forward_declare + UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare 0 @@ -12826,7 +12826,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h; Not forward_declare + UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare 0 @@ -13017,7 +13017,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h; Not forward_declare + UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare 0 @@ -13208,7 +13208,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h; Not forward_declare + UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare 0 @@ -13399,7 +13399,7 @@ 1 - UNIT_SELECTOR_RESISTOR; UnitSelector.h; Not forward_declare + UNIT_SELECTOR_RESISTOR; widgets/unit_selector.h; Not forward_declare 0 @@ -16978,7 +16978,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -17457,7 +17457,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -17648,7 +17648,7 @@ 1 - UNIT_SELECTOR_THICKNESS; UnitSelector.h + UNIT_SELECTOR_THICKNESS; widgets/unit_selector.h 0 @@ -18777,7 +18777,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -18968,7 +18968,7 @@ 1 - UNIT_SELECTOR_THICKNESS; UnitSelector.h + UNIT_SELECTOR_THICKNESS; widgets/unit_selector.h 0 @@ -19916,7 +19916,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 @@ -20523,7 +20523,7 @@ 1 - UNIT_SELECTOR_LEN; UnitSelector.h + UNIT_SELECTOR_LEN; widgets/unit_selector.h 0 diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.h b/pcb_calculator/dialogs/pcb_calculator_frame_base.h index 8b296d650c..cf39dbcc8e 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.h +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.h @@ -16,7 +16,7 @@ class UNIT_SELECTOR_LEN; class UNIT_SELECTOR_RESISTOR; class UNIT_SELECTOR_THICKNESS; -#include "UnitSelector.h" +#include "widgets/unit_selector.h" #include "kiway_player.h" #include #include diff --git a/pcb_calculator/electrical_spacing_values.cpp b/pcb_calculator/electrical_spacing_values.cpp index 9a3a8f3be6..e91309578d 100644 --- a/pcb_calculator/electrical_spacing_values.cpp +++ b/pcb_calculator/electrical_spacing_values.cpp @@ -24,10 +24,8 @@ #include -#include -#include -#include -#include +#include "pcb_calculator_frame.h" +#include "units_scales.h" extern double DoubleFromString( const wxString& TextValue ); diff --git a/pcb_calculator/eserie.cpp b/pcb_calculator/eserie.cpp index 0407f50f7e..014d99f06c 100644 --- a/pcb_calculator/eserie.cpp +++ b/pcb_calculator/eserie.cpp @@ -20,7 +20,9 @@ */ #include -#include +#include "class_regulator_data.h" +#include "attenuators/attenuator_classes.h" +#include "pcb_calculator_frame.h" #include #include diff --git a/pcb_calculator/params_read_write.cpp b/pcb_calculator/params_read_write.cpp index 456dfaf5a2..acd509c2d1 100644 --- a/pcb_calculator/params_read_write.cpp +++ b/pcb_calculator/params_read_write.cpp @@ -23,9 +23,8 @@ #include #include -#include -#include -#include +#include "pcb_calculator_frame.h" +#include "transline.h" /* * Return the value from a string, @@ -192,7 +191,7 @@ void PCB_CALCULATOR_FRAME::SetPrmBgColor( enum PRMS_ID aPrmId, const KIGFX::COLO { return; } - + TRANSLINE_IDENT* tr_ident = m_transline_list[m_currTransLineType]; for( unsigned ii = 0; ii < tr_ident->GetPrmsCount(); ii++ ) @@ -206,7 +205,7 @@ void PCB_CALCULATOR_FRAME::SetPrmBgColor( enum PRMS_ID aPrmId, const KIGFX::COLO ctl->SetStyle( 0, -1, ctl->GetDefaultStyle() ); return; } - + } } diff --git a/pcb_calculator/pcb_calculator.cpp b/pcb_calculator/pcb_calculator.cpp index e2d2cb2be9..fb098efb1c 100644 --- a/pcb_calculator/pcb_calculator.cpp +++ b/pcb_calculator/pcb_calculator.cpp @@ -22,9 +22,8 @@ #include #include -#include -#include -#include +#include "pcb_calculator_frame.h" +#include "pcb_calculator_settings.h" // Pcb_calculator data file extension: const wxString PcbCalcDataFileExt( wxT("pcbcalc") ); diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index af6b87660c..b735fe98a8 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -19,14 +19,14 @@ */ #include -#include -#include -#include -#include #include #include #include +#include "attenuators/attenuator_classes.h" +#include "class_regulator_data.h" +#include "pcb_calculator_frame.h" +#include "pcb_calculator_settings.h" // extension of pcb_calculator data filename: const wxString DataFileNameExt( wxT("pcbcalc") ); diff --git a/pcb_calculator/pcb_calculator.h b/pcb_calculator/pcb_calculator_frame.h similarity index 98% rename from pcb_calculator/pcb_calculator.h rename to pcb_calculator/pcb_calculator_frame.h index 0f792f0158..a079001087 100644 --- a/pcb_calculator/pcb_calculator.h +++ b/pcb_calculator/pcb_calculator_frame.h @@ -24,17 +24,20 @@ #ifndef PCB_CALCULATOR_H #define PCB_CALCULATOR_H -#include +#include "transline.h" // Included for SUBST_PRMS_ID definition. +#include "transline_ident.h" +#include "pcb_calculator_frame_base.h" -#include -#include -#include // Included for SUBST_PRMS_ID definition. -#include +#include "attenuators/attenuator_classes.h" +#include "class_regulator_data.h" extern const wxString PcbCalcDataFileExt; +class APP_SETTINGS_BASE; +class KIWAY; class PCB_CALCULATOR_SETTINGS; + /* Class PCB_CALCULATOR_FRAME_BASE This is the main frame for this application */ diff --git a/pcb_calculator/regulators_funct.cpp b/pcb_calculator/regulators_funct.cpp index 55632aa398..a84203253f 100644 --- a/pcb_calculator/regulators_funct.cpp +++ b/pcb_calculator/regulators_funct.cpp @@ -23,11 +23,11 @@ #include #include -#include -#include -#include -#include +#include "class_regulator_data.h" +#include "dialog_regulator_data_base.h" +#include "pcb_calculator_frame.h" +#include "pcb_calculator_settings.h" extern double DoubleFromString( const wxString& TextValue ); diff --git a/pcb_calculator/tracks_width_versus_current.cpp b/pcb_calculator/tracks_width_versus_current.cpp index ebe305f45c..bfaf968bda 100644 --- a/pcb_calculator/tracks_width_versus_current.cpp +++ b/pcb_calculator/tracks_width_versus_current.cpp @@ -30,15 +30,14 @@ #include #include -#include - -#include -#include -#include -#include +#include "attenuators/attenuator_classes.h" +#include "class_regulator_data.h" +#include "pcb_calculator_frame.h" +#include "pcb_calculator_settings.h" +#include "units_scales.h" wxString tracks_width_versus_current_formula = -#include +#include "tracks_width_versus_current_formula.h" extern double DoubleFromString( const wxString& TextValue ); @@ -424,7 +423,7 @@ void PCB_CALCULATOR_FRAME::TW_Init() // Read parameter values. auto cfg = static_cast( Kiface().KifaceSettings() ); - + m_TrackCurrentValue->SetValue( cfg->m_TrackWidth.current ); m_TrackDeltaTValue->SetValue( cfg->m_TrackWidth.delta_tc ); m_TrackLengthValue->SetValue( cfg->m_TrackWidth.track_len ); diff --git a/pcb_calculator/transline/c_microstrip.cpp b/pcb_calculator/transline/c_microstrip.cpp index 0a1317c909..abba75d04f 100644 --- a/pcb_calculator/transline/c_microstrip.cpp +++ b/pcb_calculator/transline/c_microstrip.cpp @@ -31,10 +31,10 @@ #include #include -#include -#include -#include -#include +#include "c_microstrip.h" +#include "microstrip.h" +#include "transline.h" +#include "units.h" C_MICROSTRIP::C_MICROSTRIP() : TRANSLINE(), h( 0.0 ), // height of substrate diff --git a/pcb_calculator/transline/coax.cpp b/pcb_calculator/transline/coax.cpp index bc4a09ec1b..8516b62e27 100644 --- a/pcb_calculator/transline/coax.cpp +++ b/pcb_calculator/transline/coax.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include "coax.h" +#include "units.h" COAX::COAX() : TRANSLINE() { @@ -67,11 +67,11 @@ double COAX::alphac_coax() } -/** +/** * \f$ Z_0 = \frac{Z_{0_{\mathrm{vaccum}}}}{\sqrt{\epsilon_r}}\log_{10}\left( \frac{D_{\mathrm{out}}}{D_{\mathrm{in}}}\right) \f$ - * + * * \f$ \lambda_g = \frac{c}{f \cdot \sqrt{ \epsilon_r \cdot \mu_r}} \f$ - * + * * \f$ L_{[\mathrm{rad}]} = \frac{ 2\pi\cdot L_{[\mathrm{m}]}}{\lambda_g} \f$ * */ void COAX::calcAnalyze() @@ -91,13 +91,13 @@ void COAX::calcAnalyze() } -/** +/** * \f$ D_{\mathrm{in}} = D_{\mathrm{out}} \cdot e^{-\frac{Z_0*\sqrt{\epsilon_r}}{2\pi \cdot Z_{0_{\mathrm{vaccum}}}}} \f$ - * + * * \f$ D_{\mathrm{out}} = D_{\mathrm{in}} \cdot e^{ \frac{Z_0*\sqrt{\epsilon_r}}{2\pi \cdot Z_{0_{\mathrm{vaccum}}}}} \f$ - * + * * \f$ \lambda_g = \frac{c}{f \cdot \sqrt{ \epsilon_r \cdot \mu_r}} \f$ - * + * * \f$ L_{[\mathrm{m}]} = \frac{ \lambda_g cdot L_{[\mathrm{m}]}}{2\pi} \f$ * */ void COAX::calcSynthesize() diff --git a/pcb_calculator/transline/coplanar.cpp b/pcb_calculator/transline/coplanar.cpp index 0c2db46261..830029b280 100644 --- a/pcb_calculator/transline/coplanar.cpp +++ b/pcb_calculator/transline/coplanar.cpp @@ -28,8 +28,8 @@ #include #include -#include -#include +#include "coplanar.h" +#include "units.h" COPLANAR::COPLANAR() : TRANSLINE() { diff --git a/pcb_calculator/transline/microstrip.cpp b/pcb_calculator/transline/microstrip.cpp index 95329b2ba1..5429ab5a2e 100644 --- a/pcb_calculator/transline/microstrip.cpp +++ b/pcb_calculator/transline/microstrip.cpp @@ -34,10 +34,10 @@ #include #include -#include -#include +#include "microstrip.h" +#include "transline.h" -#include +#include "units.h" MICROSTRIP::MICROSTRIP() : TRANSLINE(), h( 0.0 ), // height of substrate diff --git a/pcb_calculator/transline/rectwaveguide.cpp b/pcb_calculator/transline/rectwaveguide.cpp index 48b0c5c366..46be2dd2e2 100644 --- a/pcb_calculator/transline/rectwaveguide.cpp +++ b/pcb_calculator/transline/rectwaveguide.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include "rectwaveguide.h" +#include "units.h" RECTWAVEGUIDE::RECTWAVEGUIDE() : TRANSLINE(), mur( 0.0 ), // magnetic permeability of substrate diff --git a/pcb_calculator/transline/stripline.cpp b/pcb_calculator/transline/stripline.cpp index 8b0ed05e13..162f6cbd27 100644 --- a/pcb_calculator/transline/stripline.cpp +++ b/pcb_calculator/transline/stripline.cpp @@ -27,8 +27,8 @@ #include #include -#include -#include +#include "stripline.h" +#include "units.h" STRIPLINE::STRIPLINE() : TRANSLINE() { diff --git a/pcb_calculator/transline/transline.cpp b/pcb_calculator/transline/transline.cpp index 97af47138b..cba99805fe 100644 --- a/pcb_calculator/transline/transline.cpp +++ b/pcb_calculator/transline/transline.cpp @@ -24,9 +24,9 @@ #include #include -#include -#include +#include "transline.h" +#include "units.h" #ifndef INFINITY #define INFINITY std::numeric_limits::infinity() diff --git a/pcb_calculator/transline/twistedpair.cpp b/pcb_calculator/transline/twistedpair.cpp index 4cfc9185c0..c544baadd3 100644 --- a/pcb_calculator/transline/twistedpair.cpp +++ b/pcb_calculator/transline/twistedpair.cpp @@ -27,8 +27,8 @@ #include #include -#include -#include +#include "twistedpair.h" +#include "units.h" TWISTEDPAIR::TWISTEDPAIR() : TRANSLINE() { @@ -39,30 +39,30 @@ TWISTEDPAIR::TWISTEDPAIR() : TRANSLINE() /** * \f$ \theta = \arctan\left( T \cdot \pi \cdot D_{out} \right) \f$ - * + * * Where : - * - \f$ \theta \f$ : pitch angle + * - \f$ \theta \f$ : pitch angle * - \f$ T \f$ : Number of twists per unit length * - \f$ D_{out} \f$ : Wire diameter with insulation - * + * * \f$ e_{eff} = e_{env} \cdot \left( 0.25 + 0.0007 \cdot \theta^2 \right)\cdot\left(e_r-e_{env}\right) \f$ - * + * * Where : * - \f$ e_{env} \f$ : relative dielectric constant of air ( or some other surronding material ), * - \f$ e_r \f$ : relative dielectric constant of the film insulation, - * - \f$ e_{eff} \f$ : effective relative dielectric constant - * + * - \f$ e_{eff} \f$ : effective relative dielectric constant + * * \f$ Z_0 = \frac{Z_\mathrm{VACCUM}}{\pi \cdot \sqrt{e_{eff}}}\cosh^{-1}\left(\frac{D_{out}}{D_{in}}\right) \f$ - * + * * - \f$ Z_0 \f$ : line impedance * - \f$ Z_\mathrm{VACCUM} \f$ : vaccum impedance * - \f$ D_{in} \f$ : Wire diameter without insulation - * + * * Reference for above equations : - * + * * [1] : P. Lefferson, ``Twisted Magnet Wire Transmission Line,'' * IEEE Transactions on Parts, Hybrids, and Packaging, vol. PHP-7, no. 4, pp. 148-154, Dec. 1971. - * + * * The following URL can be used as reference : http://qucs.sourceforge.net/tech/node93.html **/ void TWISTEDPAIR::calcAnalyze() diff --git a/pcb_calculator/transline/units.h b/pcb_calculator/transline/units.h index d7c68709ed..33cc0f400d 100644 --- a/pcb_calculator/transline/units.h +++ b/pcb_calculator/transline/units.h @@ -26,7 +26,8 @@ #include #include -#include + +#include "units_scales.h" #ifndef HAVE_CMATH_ASINH inline double asinh( double x ) diff --git a/pcb_calculator/transline_dlg_funct.cpp b/pcb_calculator/transline_dlg_funct.cpp index 95eeea22f6..3c0b0f2f01 100644 --- a/pcb_calculator/transline_dlg_funct.cpp +++ b/pcb_calculator/transline_dlg_funct.cpp @@ -21,11 +21,10 @@ #include #include -#include -#include -#include -#include +#include "common_data.h" +#include "pcb_calculator_frame.h" +#include "widgets/unit_selector.h" extern double DoubleFromString( const wxString& TextValue ); diff --git a/pcb_calculator/transline_ident.cpp b/pcb_calculator/transline_ident.cpp index 138dfe5ecd..0b1fe34207 100644 --- a/pcb_calculator/transline_ident.cpp +++ b/pcb_calculator/transline_ident.cpp @@ -46,9 +46,9 @@ #include #include -#include -#include -#include +#include "pcb_calculator_settings.h" +#include "widgets/unit_selector.h" +#include "transline_ident.h" /* diff --git a/pcb_calculator/transline_ident.h b/pcb_calculator/transline_ident.h index 8ed0d68c8d..7d1695d7de 100644 --- a/pcb_calculator/transline_ident.h +++ b/pcb_calculator/transline_ident.h @@ -28,7 +28,7 @@ #include #include -#include +#include "transline.h" // An enum to handle muwave shapes: enum TRANSLINE_TYPE_ID { diff --git a/pcb_calculator/via.cpp b/pcb_calculator/via.cpp index 60022cd4a1..0f122028ad 100644 --- a/pcb_calculator/via.cpp +++ b/pcb_calculator/via.cpp @@ -46,12 +46,13 @@ #include #include -#include -#include -#include -#include -#include +#include "attenuators/attenuator_classes.h" +#include "common_data.h" +#include "class_regulator_data.h" +#include "pcb_calculator_frame.h" +#include "pcb_calculator_settings.h" +#include "units_scales.h" extern double DoubleFromString( const wxString& TextValue ); diff --git a/pcb_calculator/UnitSelector.cpp b/pcb_calculator/widgets/unit_selector.cpp similarity index 98% rename from pcb_calculator/UnitSelector.cpp rename to pcb_calculator/widgets/unit_selector.cpp index a0f45d820c..ce850b2561 100644 --- a/pcb_calculator/UnitSelector.cpp +++ b/pcb_calculator/widgets/unit_selector.cpp @@ -23,8 +23,8 @@ * a wxChoiceBox to select units in Pcb_Calculator */ -#include -#include +#include "unit_selector.h" +#include "units_scales.h" UNIT_SELECTOR_LEN::UNIT_SELECTOR_LEN( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, diff --git a/pcb_calculator/UnitSelector.h b/pcb_calculator/widgets/unit_selector.h similarity index 100% rename from pcb_calculator/UnitSelector.h rename to pcb_calculator/widgets/unit_selector.h