My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
noise_vv.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  noise_vv.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_vv.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 
30  Lines.append(new Line(-29, 12,-42, -1,QPen(QPen::darkBlue,2)));
31  Lines.append(new Line(-24, 10,-40, -6,QPen(QPen::darkBlue,2)));
32  Lines.append(new Line(-20, 7,-37,-10,QPen(QPen::darkBlue,2)));
33  Lines.append(new Line(-18, 2,-32,-12,QPen(QPen::darkBlue,2)));
34 
35  // right noise source
36  Arcs.append(new Arc( 18,-12, 24, 24, 0, 16*360,QPen(QPen::darkBlue,2)));
37  Lines.append(new Line( 30, 30, 30, 12,QPen(QPen::darkBlue,2)));
38  Lines.append(new Line( 30,-30, 30,-12,QPen(QPen::darkBlue,2)));
39 
40  Lines.append(new Line( 31, 12, 18, -1,QPen(QPen::darkBlue,2)));
41  Lines.append(new Line( 36, 10, 20, -6,QPen(QPen::darkBlue,2)));
42  Lines.append(new Line( 40, 7, 23,-10,QPen(QPen::darkBlue,2)));
43  Lines.append(new Line( 42, 2, 28,-12,QPen(QPen::darkBlue,2)));
44 
45  Lines.append(new Line(-18, 0, 18, 0,QPen(QPen::darkBlue,3)));
46 
47  Ports.append(new Port(-30,-30));
48  Ports.append(new Port( 30,-30));
49  Ports.append(new Port( 30, 30));
50  Ports.append(new Port(-30, 30));
51 
52  x1 = -44; y1 = -30;
53  x2 = 44; y2 = 30;
54 
55  tx = x1+4;
56  ty = y2+4;
57  Model = "VVnoise";
58  Name = "SRC";
59 
60  Props.append(new Property("v1", "1e-6", true,
61  QObject::tr("voltage power spectral density of source 1")));
62  Props.append(new Property("v2", "1e-6", true,
63  QObject::tr("voltage power spectral density of source 2")));
64  Props.append(new Property("C", "0.5", true,
65  QObject::tr("normalized correlation coefficient")));
66  Props.append(new Property("e", "0", false,
67  QObject::tr("frequency exponent")));
68  Props.append(new Property("c", "1", false,
69  QObject::tr("frequency coefficient")));
70  Props.append(new Property("a", "0", false,
71  QObject::tr("additive frequency term")));
72 }
73 
75 {
76 }
77 
79 {
80  return new Noise_vv();
81 }
82 
83 Element* Noise_vv::info(QString& Name, char* &BitmapFile, bool getNewOne)
84 {
85  Name = QObject::tr("Correlated Noise Sources");
86  BitmapFile = (char *) "noise_vv";
87 
88  if(getNewOne) return new Noise_vv();
89  return 0;
90 }