Skip to content

Commit

Permalink
Merge pull request #722 from andresmmera/ImprovedAttenuatorTool
Browse files Browse the repository at this point in the history
Improved Qucs-S Attenuator Tool
  • Loading branch information
ra3xdh authored May 17, 2024
2 parents 4562245 + 797081b commit eb0509e
Show file tree
Hide file tree
Showing 15 changed files with 1,382 additions and 103 deletions.
807 changes: 755 additions & 52 deletions qucs-attenuator/attenuatorfunc.cpp

Large diffs are not rendered by default.

29 changes: 26 additions & 3 deletions qucs-attenuator/attenuatorfunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
#define PI_TYPE 0
#define TEE_TYPE 1
#define BRIDGE_TYPE 2
#define REFLECTION_TYPE 3
#define QW_SERIES_TYPE 4
#define QW_SHUNT_TYPE 5
#define L_PAD_1ST_SERIES 6
#define L_PAD_1ST_SHUNT 7
#define R_SERIES 8
#define R_SHUNT 9

#define C0 299792458
#define PI 3.141592653589793238462643383279502884197169399375105820974944592307816406286

#include <cmath>

Expand All @@ -29,6 +39,19 @@ struct tagATT
double R1;
double R2;
double R3;
double R4;
double L; // Length of the quarter-wavelength inverter. QW series/shunt attenuator only
double PR1;//Power dissipated by R1 [W]
double PR2;//Power dissipated by R2 [W]
double PR3;//Power dissipated by R3 [W]
double PR4;//Power dissipated by R4 [W]
double Pin;//Input power [W]
bool minR; //The reflection attenuator can be designed using two different resistor values. The first one is such
//as R < Z0 whereas the other is such as R > Z0. This field is just a flag to indicate what solution
//qucsattenuator should use.
double freq;//Central frequency for quarter-wavelength attenuators
bool useLumped;//Used only in the quarter wave attenuators. It indicates that the program must replace the
//qw line by its lumped element equivalent (CLC)
};

class QString;
Expand All @@ -40,9 +63,9 @@ class QUCS_Att
~QUCS_Att();

int Calc(tagATT*);
static QString* createSchematic(tagATT*);


static QString* createSchematic(tagATT*, bool);
};

QString num2str(double);

#endif
Binary file added qucs-attenuator/bitmaps/L_pad_1st_series.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qucs-attenuator/bitmaps/L_pad_1st_shunt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qucs-attenuator/bitmaps/Rseries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qucs-attenuator/bitmaps/Rshunt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified qucs-attenuator/bitmaps/att_bridge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qucs-attenuator/bitmaps/att_reflection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qucs-attenuator/bitmaps/qw_series.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qucs-attenuator/bitmaps/qw_series_CLC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qucs-attenuator/bitmaps/qw_shunt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qucs-attenuator/bitmaps/qw_shunt_CLC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit eb0509e

Please sign in to comment.