mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-08 07:53:40 +00:00
Linear magnitude option
This commit is contained in:
parent
602289d9cb
commit
d526270fd2
4 changed files with 9 additions and 1 deletions
|
|
@ -886,6 +886,7 @@ QString TraceXYPlot::AxisTypeToName(TraceXYPlot::YAxisType type)
|
|||
switch(type) {
|
||||
case YAxisType::Disabled: return "Disabled";
|
||||
case YAxisType::Magnitude: return "Magnitude";
|
||||
case YAxisType::MagnitudeLinear: return "Magnitude (linear)";
|
||||
case YAxisType::Phase: return "Phase";
|
||||
case YAxisType::UnwrappedPhase: return "Unwrapped Phase";
|
||||
case YAxisType::VSWR: return "VSWR";
|
||||
|
|
@ -998,6 +999,9 @@ QPointF TraceXYPlot::traceToCoordinate(Trace *t, unsigned int sample, TraceXYPlo
|
|||
case YAxisType::Magnitude:
|
||||
ret.setY(Util::SparamTodB(data.y));
|
||||
break;
|
||||
case YAxisType::MagnitudeLinear:
|
||||
ret.setY(abs(data.y));
|
||||
break;
|
||||
case YAxisType::Phase:
|
||||
ret.setY(Util::SparamToDegree(data.y));
|
||||
break;
|
||||
|
|
@ -1236,6 +1240,7 @@ QString TraceXYPlot::AxisUnit(TraceXYPlot::YAxisType type)
|
|||
if(source == TraceModel::DataSource::VNA) {
|
||||
switch(type) {
|
||||
case TraceXYPlot::YAxisType::Magnitude: return "dB";
|
||||
case TraceXYPlot::YAxisType::MagnitudeLinear: return "";
|
||||
case TraceXYPlot::YAxisType::Phase: return "°";
|
||||
case TraceXYPlot::YAxisType::UnwrappedPhase: return "°";
|
||||
case TraceXYPlot::YAxisType::VSWR: return "";
|
||||
|
|
@ -1270,6 +1275,7 @@ QString TraceXYPlot::AxisPrefixes(TraceXYPlot::YAxisType type)
|
|||
if(source == TraceModel::DataSource::VNA) {
|
||||
switch(type) {
|
||||
case TraceXYPlot::YAxisType::Magnitude: return " ";
|
||||
case TraceXYPlot::YAxisType::MagnitudeLinear: return "num ";
|
||||
case TraceXYPlot::YAxisType::Phase: return " ";
|
||||
case TraceXYPlot::YAxisType::UnwrappedPhase: return " ";
|
||||
case TraceXYPlot::YAxisType::VSWR: return " ";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue