My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
noise_ii.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  noise_ii.cpp
3  --------------
4  begin : Sat Aug 20 2005
5  copyright : (C) 2005 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "noise_ii.h"
19 
20 
22 {
23  Description = QObject::tr("correlated current sources");
24 
25  // left noise source
26  Arcs.append(new Arc(-42,-12, 24, 24, 0, 16*360,QPen(QPen::darkBlue,2)));
27  Lines.append(new Line(-30, 30,-30, 12,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line(-30,-30,-30,-12,QPen(QPen::darkBlue,2)));
29  Lines.append(new Line(-30, 7,-30, -7,QPen(QPen::darkBlue,3)));
30  Lines.append(new Line(-30, -6,-34, 0,QPen(QPen::darkBlue,3)));
31  Lines.append(new Line(-30, -6,-26, 0,QPen(QPen::darkBlue,3)));
32 
33  Lines.append(new Line(-29, 12,-42, -1,QPen(QPen::darkBlue,2)));
34  Lines.append(new Line(-24, 10,-27, 7,QPen(QPen::darkBlue,2)));
35  Lines.append(new Line(-37, -3,-40, -6,QPen(QPen::darkBlue,2)));
36  Lines.append(new Line(-20, 7,-25, 2,QPen(QPen::darkBlue,2)));
37  Lines.append(new Line(-34, -7,-37,-10,QPen(QPen::darkBlue,2)));
38  Lines.append(new Line(-18, 1,-31,-12,QPen(QPen::darkBlue,2)));
39 
40  // right noise source
41  Arcs.append(new Arc( 18,-12, 24, 24, 0, 16*360,QPen(QPen::darkBlue,2)));
42  Lines.append(new Line( 30, 30, 30, 12,QPen(QPen::darkBlue,2)));
43  Lines.append(new Line( 30,-30, 30,-12,QPen(QPen::darkBlue,2)));
44  Lines.append(new Line( 30, 7, 30, -7,QPen(QPen::darkBlue,3)));
45  Lines.append(new Line( 30, -6, 26, 0,QPen(QPen::darkBlue,3)));
46  Lines.append(new Line( 30, -6, 34, 0,QPen(QPen::darkBlue,3)));
47 
48  Lines.append(new Line( 31, 12, 18, -1,QPen(QPen::darkBlue,2)));
49  Lines.append(new Line( 36, 10, 33, 7,QPen(QPen::darkBlue,2)));
50  Lines.append(new Line( 23, -3, 20, -6,QPen(QPen::darkBlue,2)));
51  Lines.append(new Line( 40, 7, 35, 2,QPen(QPen::darkBlue,2)));
52  Lines.append(new Line( 26, -7, 23,-10,QPen(QPen::darkBlue,2)));
53  Lines.append(new Line( 42, 1, 29,-12,QPen(QPen::darkBlue,2)));
54 
55  Lines.append(new Line(-18, 0, 18, 0,QPen(QPen::darkBlue,3)));
56 
57  Ports.append(new Port(-30,-30));
58  Ports.append(new Port( 30,-30));
59  Ports.append(new Port( 30, 30));
60  Ports.append(new Port(-30, 30));
61 
62  x1 = -44; y1 = -30;
63  x2 = 44; y2 = 30;
64 
65  tx = x1+4;
66  ty = y2+4;
67  Model = "IInoise";
68  Name = "SRC";
69 
70  Props.append(new Property("i1", "1e-6", true,
71  QObject::tr("current power spectral density of source 1")));
72  Props.append(new Property("i2", "1e-6", true,
73  QObject::tr("current power spectral density of source 2")));
74  Props.append(new Property("C", "0.5", true,
75  QObject::tr("normalized correlation coefficient")));
76  Props.append(new Property("e", "0", false,
77  QObject::tr("frequency exponent")));
78  Props.append(new Property("c", "1", false,
79  QObject::tr("frequency coefficient")));
80  Props.append(new Property("a", "0", false,
81  QObject::tr("additive frequency term")));
82 }
83 
85 {
86 }
87 
89 {
90  return new Noise_ii();
91 }
92 
93 Element* Noise_ii::info(QString& Name, char* &BitmapFile, bool getNewOne)
94 {
95  Name = QObject::tr("Correlated Noise Sources");
96  BitmapFile = (char *) "noise_ii";
97 
98  if(getNewOne) return new Noise_ii();
99  return 0;
100 }