Amplitude changes reverted using floating point format

Signed-off-by: KrzysztofHerman <herman@ihp-microelectronics.com>
This commit is contained in:
KrzysztofHerman 2024-12-04 08:25:29 +01:00
parent 043cb8214c
commit 7a330e287b

View File

@ -106,7 +106,7 @@ QString Source_ac::ngspice_netlist()
double z0 = spicecompat::normalize_value(getProperty("Z")->Value).toDouble();
double p = spicecompat::normalize_value(getProperty("P")->Value).toDouble();
double vrms = sqrt(z0/1000.0)*pow(10, p/20.0);
double vamp = 2*vrms*sqrt(2.0);
double vamp = 2.0*vrms*sqrt(2.0);
QString f = spicecompat::normalize_value(getProperty("f")->Value);
bool en_tran = true;
@ -140,7 +140,7 @@ QString Source_ac::xyce_netlist()
QString s_p = spicecompat::normalize_value(getProperty("P")->Value);
double p = s_p.toDouble();
double vrms = sqrt(z0/1000.0)*pow(10, p/20.0);
double vamp = 2*vrms*sqrt(2.0);
double vamp = 2.0*vrms*sqrt(2.0);
bool en_tran = true;
if (getProperty("EnableTran")->Value == "true") {