<commit_before>//!
//! @file   SignalSecondOrderFilter.hpp
//! @author <NAME> <<EMAIL>>
//! @date   2010-01-22
//!
//! @brief Contains a Signal Second Order Filter Component using CoreUtilities
//!
//$Id$

#ifndef SIGNALSECONORDERFILTER_HPP_INCLUDED
#define SIGNALSECONORDERFILTER_HPP_INCLUDED

#include "../../ComponentEssentials.h"
#include "../../ComponentUtilities.h"

//!
//! @brief
//! @ingroup SignalComponents
//!
class SignalSecondOrderFilter : public ComponentSignal
{

private:
    SecondOrderFilter mFilter;
    double mWnum, mDnum, mWden, mDden, mK;
    double mStartY;
    double mMin, mMax;
    Port *mpIn, *mpOut;

public:
    static Component *Creator()
    {
        std::cout << "running Second Order Filter creator" << std::endl;
        return new SignalSecondOrderFilter("Filter");
    }

    SignalSecondOrderFilter(const string name) : ComponentSignal(name)
    {
        mTypeName = "SignalSecondOrderFilter";
        mStartY = 0.0;

        mMin = -1.5E+300;
        mMax = 1.5E+300;

        mK = 1.0;
        mWnum = 1e10;
        mDnum = 1.0;
        mWden = 1.0*2.0*3.1415;
        mDden = 0.7;

        mpIn = addReadPort("in", "NodeSignal");
        mpOut = addWritePort("out", "NodeSignal");

        registerParameter("k", "Gain", "-", mK);
        registerParameter("wnum", "Numerator break frequency", "rad/s", mWnum);
        registerParameter("dnum", "Numerator damp coefficient", "-", mDnum);
        registerParameter("wden", "Denumerator break frequency", "rad/s", mWden);
        registerParameter("dden", "Numerator damp coefficient", "-", mDden);
        registerParameter("min", "Lower limit for output", "-", mMin);
        registerParameter("max", "Upper limit for output", "-", mMax);
    }


    void initialize()
    {
        //double u0 = mpIn->readNode(NodeSignal::VALUE);

        double num[3];
        double den[3];

        num[0] = mK/pow(mWnum, 2);
        num[1] = mK*2.0*mDnum/mWnum;
        num[2] = mK;<commit_msg>Changed some parameters (spelled correctly)<commit_after>//!
//! @file   SignalSecondOrderFilter.hpp
//! @author <NAME> <<EMAIL>>
//! @date   2010-01-22
//!
//! @brief Contains a Signal Second Order Filter Component using CoreUtilities
//!
//$Id$

#ifndef SIGNALSECONORDERFILTER_HPP_INCLUDED
#define SIGNALSECONORDERFILTER_HPP_INCLUDED

#include "../../ComponentEssentials.h"
#include "../../ComponentUtilities.h"

//!
//! @brief
//! @ingroup SignalComponents
//!
class SignalSecondOrderFilter : public ComponentSignal
{

private:
    SecondOrderFilter mFilter;
    double mWnum, mDnum, mWden, mDden, mK;
    double mStartY;
    double mMin, mMax;
    Port *mpIn, *mpOut;

public:
    static Component *Creator()
    {
        std::cout << "running Second Order Filter creator" << std::endl;
        return new SignalSecondOrderFilter("Filter");
    }

    SignalSecondOrderFilter(const string name) : ComponentSignal(name)
    {
        mTypeName = "SignalSecondOrderFilter";
        mStartY = 0.0;

        mMin = -1.5E+300;
        mMax = 1.5E+300;

        mK = 1.0;
        mWnum = 1e10;
        mDnum = 1.0;
        mWden = 1.0*2.0*3.1415;
        mDden = 0.7;

        mpIn = addReadPort("in", "NodeSignal");
        mpOut = addWritePort("out", "NodeSignal");

        registerParameter("k", "Gain", "-", mK);
        registerParameter("wnum", "Numerator break frequency", "rad/s", mWnum);
        registerParameter("dnum", "Numerator damp coefficient", "-", mDnum);
        registerParameter("wden", "Denominator break frequency", "rad/s", mWden);
        registerParameter("dden", "Denominator damp coefficient", "-", mDden);
        registerParameter("min", "Output Lower limit", "-", mMin);
        registerParameter("max", "Output Upper limit", "-", mMax);
    }


    void initialize()
    {
        //double u0 = mpIn->readNode(NodeSignal::VALUE);

        double num[3];
        double den[3];

        num[0] = mK/pow(mWnum, 2);
        num[1] = mK*2.0*mDnum/mWnum;
        num[2] = mK;
{'fraction_non_alphanumeric': 0.15326633165829145, 'fraction_numerical': 0.023618090452261306, 'mean_word_length': 2.7663197729422895, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6100433', 'n_tokens_mistral': 1388, 'n_tokens_neox': 1288, 'n_words': 293}