Updated graphs to use new math system

This commit is contained in:
Jan Käberich 2020-11-28 22:34:40 +01:00
parent a7ff3d60fb
commit 49f9b5442d
16 changed files with 263 additions and 518 deletions

View file

@ -56,12 +56,12 @@ std::complex<double> TraceSmithChart::pixelToData(QPoint p)
QPoint TraceSmithChart::markerToPixel(TraceMarker *m)
{
QPoint ret = QPoint();
if(!m->isTimeDomain()) {
// if(!m->isTimeDomain()) {
if(m->getPosition() >= sweep_fmin && m->getPosition() <= sweep_fmax) {
auto d = m->getData();
ret = transform.map(QPoint(d.real() * smithCoordMax, -d.imag() * smithCoordMax));
}
}
// }
return ret;
}
@ -160,9 +160,9 @@ void TraceSmithChart::draw(QPainter &p) {
// only draw markers if the trace has at least one point
auto markers = t.first->getMarkers();
for(auto m : markers) {
if (m->isTimeDomain()) {
continue;
}
// if (m->isTimeDomain()) {
// continue;
// }
if (limitToSpan && (m->getPosition() < sweep_fmin || m->getPosition() > sweep_fmax)) {
continue;
}
@ -268,7 +268,7 @@ void TraceSmithChart::updateContextMenu()
bool TraceSmithChart::supported(Trace *t)
{
if(t->isReflection()) {
if(t->outputType() == Trace::DataType::Frequency && t->isReflection()) {
return true;
} else {
return false;