You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.3 KiB
C++

/*
* SignalDecomposeFIV.h
*
* Author: Aleksey Gerasimenko
* gerasimenko.aleksey.n@gmail.com
*/
#include "SYSCTRL/SignalDecompose.h"
#ifndef SYSCTRL_SIGNALDECOMPOSEFIV_H_
#define SYSCTRL_SIGNALDECOMPOSEFIV_H_
namespace SYSCTRL
{
struct SignalDecomposeFIVConfiguration
{
FLTSYSLIB::FilterForthConfiguration projection_filter;
SignalDecomposeFIVConfiguration():
projection_filter()
{}
};//SignalDecomposeFIVConfiguration
class SignalDecomposeFIV: public SYSCTRL::SignalDecompose
{
private:
FLTSYSLIB::FilterForth m_projection_filter_active;
FLTSYSLIB::FilterForth m_projection_filter_reactive;
public:
SignalDecomposeFIV();
void setup(float time_sample);
void configure(const SignalDecomposeFIVConfiguration& config);
public:
void reset();
void get_outputs(float& projection_active, float& projection_reactive);
public:
void execute(float reference, float ort_cos, float ort_sin);
private:
void (SignalDecomposeFIV::*_execute)(float reference, float ort_cos, float ort_sin);
void _execute_undef(float reference, float ort_cos, float ort_sin);
void _execute_operational(float reference, float ort_cos, float ort_sin);
//
};//SignalDecomposeFIV
} /* namespace SYSCTRL */
#endif /* SYSCTRL_SIGNALDECOMPOSEFIV_H_ */