mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 23:43:42 +00:00
Add YAxis: impedance and enable log option
This commit is contained in:
parent
124feb5b6b
commit
cdfe95af17
4 changed files with 12 additions and 5 deletions
|
|
@ -108,6 +108,8 @@ double YAxis::sampleToCoordinate(Trace::Data data, Trace *t, unsigned int sample
|
|||
return data.y.real();
|
||||
case YAxis::Type::Imaginary:
|
||||
return data.y.imag();
|
||||
case YAxis::Type::AbsImpedance:
|
||||
return abs(Util::SparamToImpedance(data.y, t->getReferenceImpedance()));
|
||||
case YAxis::Type::SeriesR:
|
||||
return Util::SparamToResistance(data.y, t->getReferenceImpedance());
|
||||
case YAxis::Type::Reactance:
|
||||
|
|
@ -201,6 +203,7 @@ QString YAxis::TypeToName(Type type)
|
|||
case Type::VSWR: return "VSWR";
|
||||
case Type::Real: return "Real";
|
||||
case Type::Imaginary: return "Imaginary";
|
||||
case Type::AbsImpedance: return "Impedance (absolute)";
|
||||
case Type::SeriesR: return "Resistance";
|
||||
case Type::Reactance: return "Reactance";
|
||||
case Type::Capacitance: return "Capacitance";
|
||||
|
|
@ -247,6 +250,7 @@ QString YAxis::Unit(Type type, TraceModel::DataSource source)
|
|||
case Type::Imaginary:
|
||||
case Type::QualityFactor:
|
||||
return "";
|
||||
case Type::AbsImpedance: return "Ω";
|
||||
case Type::SeriesR: return "Ω";
|
||||
case Type::Reactance: return "Ω";
|
||||
case Type::Capacitance: return "F";
|
||||
|
|
@ -281,6 +285,7 @@ QString YAxis::Prefixes(Type type, TraceModel::DataSource source)
|
|||
case Type::Real: return "pnum ";
|
||||
case Type::Imaginary: return "pnum ";
|
||||
case Type::QualityFactor: return " ";
|
||||
case Type::AbsImpedance: return " ";
|
||||
case Type::SeriesR: return "m kM";
|
||||
case Type::Reactance: return "m kM";
|
||||
case Type::Capacitance: return "pnum ";
|
||||
|
|
@ -337,6 +342,7 @@ std::set<YAxis::Type> YAxis::getSupported(XAxis::Type type, TraceModel::DataSour
|
|||
ret.insert(YAxis::Type::VSWR);
|
||||
ret.insert(YAxis::Type::Real);
|
||||
ret.insert(YAxis::Type::Imaginary);
|
||||
ret.insert(YAxis::Type::AbsImpedance);
|
||||
ret.insert(YAxis::Type::SeriesR);
|
||||
ret.insert(YAxis::Type::Reactance);
|
||||
ret.insert(YAxis::Type::Capacitance);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue