4#define _USE_MATH_DEFINES
50 double powerFactor = 0;
51 double phase = 0xFFFFFFFFFFFFFFFF;
52 bool dynamic_loading =
false;
67 frequency = this->
analytics.base_frequency;
84 reactive = (apparent - active)*
sign(phase);
86 reactive = (apparent - active);
89 powerFactor = (active/apparent);
90 base_current = ¤t;
103 if(time_start > time_end){
104 double temp = time_end;
105 time_end = time_start;
112 unsigned int idx = 0;
126 return (energy_1 - energy_0)*
sign;
200 if (energy_in_month <= 100)
202 if (energy_in_month > 50) cost = 0.68 * (energy_in_month - 50) + 50 * 0.58;
204 else if (energy_in_month <= 650)
206 if (energy_in_month > 350) cost = 1.4 * (energy_in_month - 350) + 1.25 * 150 + 0.83 * 200;
207 else if (energy_in_month > 200) cost = 1.25 * (energy_in_month - 200) + 0.83 * 200;
208 else cost = 0.83 * energy_in_month;
210 else if (energy_in_month <= 1000) cost = energy_in_month * 1.5;
211 else cost = energy_in_month * 1.65;
double get_frequency() const
double get_reactive() const
double get_apparent() const
double get_active() const
double get_energy(double time_start, double time_end)
get the energy over the coarse of a certain time period
_power(_voltage &volt, _current ¤t)
string get_setting(string class_name, string setting)
double phase_diff(signal &base_sig1, signal &base_sig2)
calculates phase difference based on maximas and minimas times
signal multiply(signal &base_sig1, signal &base_sig2, int mode=INTERSECT)
signal class the parent class for every other signal or any form of time-sorted (time,...
const bool isTimeAnalysed()
check if the signal was analysed in the time domain
const _analytics * get_analytics() const
get analytics of the time_domain analysed signal
bool analyse()
generalized huge analysis in the time domain fetches basic data
double getValue(int row, int col)
easy abstracted values extraction
double tarrif_calc(double energy_in_month)
calculate energy cost based on how much energy was consumed in a month according to egyptian tarrif
this file includes the base class "signal" for signals modeling and analysing thier time-domain / fre...
_signal_operation signal_operation_global
this file includes the basic signal_operation class responsible for doing any required manipulation o...
a basic structure that holds basic analysis results
double rms
rms for the signal