Skip to content

Commit

Permalink
Qucs filter: Fix for the warning related to the new features
Browse files Browse the repository at this point in the history
Some warnings remained after merging Qucs#415. In this commit, two unused
variables are removed at qw_coupled_ring_filter.cpp. Moreover, the
substrate parameters for the capacitively coupled shunt resonators are
removed since there's no microstrip synthesis available
  • Loading branch information
andresmmera committed Jul 15, 2017
1 parent ac43ddf commit ed76064
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion qucs/qucs-filter/ccoupled_shunt_resonators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ CCoupled_Shunt_Resonator_Filter::CCoupled_Shunt_Resonator_Filter()

// -----------------------------------------------------------------------
// This function generates the schematic
QString* CCoupled_Shunt_Resonator_Filter::createSchematic(tFilter *Filter, tSubstrate *Substrate, bool isMicrostrip)
QString* CCoupled_Shunt_Resonator_Filter::createSchematic(tFilter *Filter)
{
//Design equations
double f0 = Filter->Frequency+0.5*(Filter->Frequency2-Filter->Frequency);//Central frequency
Expand Down
2 changes: 1 addition & 1 deletion qucs/qucs-filter/ccoupled_shunt_resonators.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CCoupled_Shunt_Resonator_Filter : public TL_Filter {
public:
CCoupled_Shunt_Resonator_Filter();

static QString* createSchematic(tFilter*, tSubstrate*, bool);
static QString* createSchematic(tFilter*);
};

#endif
2 changes: 1 addition & 1 deletion qucs/qucs-filter/qucsfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ QString * QucsFilter::calculateFilter(struct tFilter * Filter)
s = QW_Coupled_Ring_Filter::createSchematic(Filter, &Substrate, isMicrostrip);
return s;
case 7: // Capacitively coupled shunt resonators
s = CCoupled_Shunt_Resonator_Filter::createSchematic(Filter, &Substrate, isMicrostrip);
s = CCoupled_Shunt_Resonator_Filter::createSchematic(Filter);
return s;
case 8: // equation defined filter
s = Equation_Filter::createSchematic(Filter);
Expand Down
2 changes: 0 additions & 2 deletions qucs/qucs-filter/qw_coupled_ring_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ QString* QW_Coupled_Ring_Filter::createSchematic(tFilter *Filter, tSubstrate *Su
double y = 0.01; // Bandpass ripple (dB)
double Ye = 1/Ze;
double x = -pow(10,(-y/20));
double rf = ftz/f0;//Ratio between the first transmission zero and the central frequency
double TZ = (sin(pi*ftz/(2*f0))*sin(pi*ftz/(2*f0)))/(1 + cos(pi*ftz/(2*f0))*cos(pi*ftz/(2*f0)));
double theta_tz = pi*ftz/(2*f0);
double SQ = sqrt((1-x*x)*(TZ*TZ-1)*(TZ*TZ-1)*Z0*Z0);
double R = -Ye*Z0*(Z0*(x*x-2)+2*SQ);
double Q = 2*TZ*TZ*Ye*Z0*(Z0*(x*x-2)+SQ);
Expand Down

0 comments on commit ed76064

Please sign in to comment.