71 Real currPhase = mInitialPhase + 2 *
PI * time * mFreqStart;
72 Real currFreq = mFreqStart;
74 if (time > mTimeStart + mDuration) {
75 currPhase += 2 *
PI * mRocof / 2 * pow(mDuration, 2);
77 2 *
PI * mRocof * mDuration * (time - (mTimeStart + mDuration));
79 }
else if (time > mTimeStart) {
82 currPhase += 2 *
PI * (mFreqEnd - mFreqStart) / 2 *
83 ((time - mTimeStart) -
84 2 * mDuration / (2 *
PI) *
85 sin(2 *
PI / (2 * mDuration) * (time - mTimeStart)));
86 currFreq += (mFreqEnd - mFreqStart) / 2 *
87 (1 - cos(2 *
PI / (2 * mDuration) * (time - mTimeStart)));
89 currPhase += 2 *
PI * mRocof * pow(time - mTimeStart, 2) / 2;
90 currFreq += mRocof * (time - mTimeStart);
void setParameters(Complex initialPhasor, Real freqStart, Real ramp, Real timeStart, Real duration, bool smoothRamp=true)
set frequency ramp specific parameters