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.
58 lines
1.2 KiB
C++
58 lines
1.2 KiB
C++
/*
|
|
* SignalDecompose.h
|
|
*
|
|
* Author: Aleksey Gerasimenko
|
|
* gerasimenko.aleksey.n@gmail.com
|
|
*/
|
|
|
|
#include <math.h>
|
|
#include <stdint.h>
|
|
|
|
#include "SYSCTRL/HeadersFLTSYSLIB.h"
|
|
|
|
#ifndef SYSCTRL_SIGNALDECOMPOSE_H_
|
|
#define SYSCTRL_SIGNALDECOMPOSE_H_
|
|
|
|
namespace SYSCTRL
|
|
{
|
|
|
|
struct SignalDecomposeStructure
|
|
{
|
|
float projection_active;
|
|
float projection_reactive;
|
|
void reset()
|
|
{
|
|
projection_active = FP_ZERO;
|
|
projection_reactive = FP_ZERO;
|
|
}
|
|
SignalDecomposeStructure():
|
|
projection_active(FP_ZERO),
|
|
projection_reactive(FP_ZERO)
|
|
{}
|
|
};//
|
|
|
|
|
|
class SignalDecompose
|
|
{
|
|
protected:
|
|
float m_time_sample;
|
|
protected:
|
|
float m_projection_active;
|
|
float m_projection_reactive;
|
|
public:
|
|
SignalDecompose();
|
|
virtual void setup(float time_sample) = 0;
|
|
public:
|
|
virtual void reset() = 0;
|
|
virtual void get_outputs(float& projection_active, float& projection_reactive) = 0;
|
|
public:
|
|
virtual void execute(float reference, float ort_cos, float ort_sin) = 0;
|
|
protected:
|
|
virtual void _execute_undef(float reference, float ort_cos, float ort_sin) = 0;
|
|
virtual void _execute_operational(float reference, float ort_cos, float ort_sin) = 0;
|
|
};
|
|
|
|
} /* namespace SYSCTRL */
|
|
|
|
#endif /* SYSCTRL_SIGNALDECOMPOSE_H_ */
|