Brief description of class still missing. More...
#include <NewNoiseModel.h>
Public Types | |
| enum | Type { LowAcceleration, HighAcceleration, LowVelocity, HighVelocity, LowDisplacement, HighDisplacement } |
Public Member Functions | |
| Curve< Point2D > | curve (Type t, double minFrequency, double maxFrequency, int n, SamplingOptions options) |
Static Public Member Functions | |
| static double | highAcceleration (double frequency, bool &ok) |
| static double | highDisplacement (double frequency, bool &ok) |
| static double | highVelocity (double frequency, bool &ok) |
| static double | lowAcceleration (double frequency, bool &ok) |
| static double | lowDisplacement (double frequency, bool &ok) |
| static double | lowVelocity (double frequency, bool &ok) |
Brief description of class still missing.
Full description of class still missing
| enum NewNoiseModel::Type |
| Curve< Point2D > NewNoiseModel::curve | ( | Type | t, |
| double | minFrequency, | ||
| double | maxFrequency, | ||
| int | n, | ||
| SamplingOptions | options | ||
| ) |
References HighAcceleration, highAcceleration(), HighDisplacement, highDisplacement(), HighVelocity, highVelocity(), QGpCoreTools::Curve< pointType >::line(), LowAcceleration, lowAcceleration(), LowDisplacement, lowDisplacement(), LowVelocity, lowVelocity(), QGpCoreTools::Curve< pointType >::remove(), QGpCoreTools::Curve< pointType >::resample(), QGpCoreTools::Point2D::setY(), TRACE, and QGpCoreTools::Point2D::x().
{
TRACE;
Curve<Point2D> res;
res.line(Point2D(minFrequency, 0.0), Point2D(maxFrequency, 0.0));
res.resample(n, minFrequency, maxFrequency, options);
int i=0;
while(i<n) {
Point2D& p=res[i];
double y;
bool ok;
switch(t) {
case LowAcceleration:
y=lowAcceleration(p.x(), ok);
break;
case HighAcceleration:
y=highAcceleration(p.x(), ok);
break;
case LowVelocity:
y=lowVelocity(p.x(), ok);
break;
case HighVelocity:
y=highVelocity(p.x(), ok);
break;
case LowDisplacement:
y=lowDisplacement(p.x(), ok);
break;
case HighDisplacement:
y=highDisplacement(p.x(), ok);
break;
}
if(ok) {
// Get rid of dB scale, transforms to m/s^2/sqrt(Hz)
p.setY(pow(10.0, y*0.2));
i++;
} else {
// Standard model does not exist at that frequency, remove sample.
res.remove(i);
n--;
}
}
return res;
}
| double NewNoiseModel::highAcceleration | ( | double | frequency, |
| bool & | ok | ||
| ) | [static] |
Referenced by curve().
{
return interpole(1.0/frequency, 12, highPeriods, highA, highB, ok);
}
| double NewNoiseModel::highDisplacement | ( | double | frequency, |
| bool & | ok | ||
| ) | [static] |
Referenced by curve().
{
double period=1.0/frequency;
return interpole(period, 12, highPeriods, highA, highB, ok) + 20.0*log10(period*period/(4*M_PI*M_PI));
}
| double NewNoiseModel::highVelocity | ( | double | frequency, |
| bool & | ok | ||
| ) | [static] |
Referenced by curve().
{
double period=1.0/frequency;
return interpole(period, 12, highPeriods, highA, highB, ok) + 20.0*log10(period/(2*M_PI));
}
| double NewNoiseModel::lowAcceleration | ( | double | frequency, |
| bool & | ok | ||
| ) | [static] |
Referenced by curve().
{
return interpole(1.0/frequency, 22, lowPeriods, lowA, lowB, ok);
}
| double NewNoiseModel::lowDisplacement | ( | double | frequency, |
| bool & | ok | ||
| ) | [static] |
Referenced by curve().
{
double period=1.0/frequency;
return interpole(period, 22, lowPeriods, lowA, lowB, ok) + 20.0*log10(period*period/(4*M_PI*M_PI));
}
| double NewNoiseModel::lowVelocity | ( | double | frequency, |
| bool & | ok | ||
| ) | [static] |
Referenced by curve().
{
double period=1.0/frequency;
return interpole(period, 22, lowPeriods, lowA, lowB, ok) + 20.0*log10(period/(2*M_PI));
}