mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 15:04:11 +00:00
Min/Max/Delta markers
This commit is contained in:
parent
b5cd6e0072
commit
49fb02be23
16 changed files with 351 additions and 45 deletions
|
|
@ -201,6 +201,21 @@ bool Trace::isReflection()
|
|||
return reflection;
|
||||
}
|
||||
|
||||
double Trace::findExtremumFreq(bool max)
|
||||
{
|
||||
double compare = max ? numeric_limits<double>::min() : numeric_limits<double>::max();
|
||||
double freq = 0.0;
|
||||
for(auto d : _data) {
|
||||
double amplitude = abs(d.S);
|
||||
if((max && (amplitude > compare)) || (!max && (amplitude < compare))) {
|
||||
// higher/lower extremum found
|
||||
compare = amplitude;
|
||||
freq = d.frequency;
|
||||
}
|
||||
}
|
||||
return freq;
|
||||
}
|
||||
|
||||
QString Trace::getTouchstoneFilename() const
|
||||
{
|
||||
return touchstoneFilename;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue