Hotfixes
This commit is contained in:
parent
a9ba49505e
commit
034c7231ef
@ -1,44 +0,0 @@
|
||||
#ifndef DATA_ACQUISITION_H
|
||||
#define DATA_ACQUISITION_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct {
|
||||
float mean;
|
||||
float standardDeviation;
|
||||
int possibleFaultySensor;
|
||||
} Metrics;
|
||||
|
||||
typedef struct {
|
||||
int sensorsNumber;
|
||||
int slidingWindowSize;
|
||||
} Matrix;
|
||||
|
||||
void initializeReadings(int numSensors, float deltaTime);
|
||||
bool freeReadings();
|
||||
|
||||
int getSensorsNumber();
|
||||
int getSlidingWindowSize();
|
||||
bool isFull(int sensorIndex);
|
||||
|
||||
void addReading(float value);
|
||||
|
||||
float getAverageOnSensor(int sensorIndex);
|
||||
float getAverageOnAllSensors();
|
||||
float getOverallAverage();
|
||||
|
||||
float getStandardDeviationOnSensor(int sensorIndex);
|
||||
float getStandardDeviationOnAllSensors();
|
||||
float getOverallStandardDeviation();
|
||||
|
||||
float getLastReading(int sensorIndex);
|
||||
|
||||
bool anomalyDetect(float average, float standardDeviation);
|
||||
|
||||
int getOutlierCount();
|
||||
|
||||
Metrics getMetrics(float **readings, int sensorNumber, int slidingWindow);
|
||||
|
||||
#endif // DATA_ACQUISITION_H
|
||||
Binary file not shown.
@ -35,7 +35,7 @@ float getOverallStandardDeviation();
|
||||
|
||||
float getLastReading(int sensorIndex);
|
||||
|
||||
bool anomalyDetect(float average, float standardDeviation);
|
||||
void anomalyDetect(float average, float standardDeviation);
|
||||
|
||||
int getOutlierCount();
|
||||
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
#include <stdbool.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <dataAcquisition.h>
|
||||
|
||||
int outlierCount;
|
||||
|
||||
// Variable definition
|
||||
@ -10,11 +12,7 @@ static float **readings;
|
||||
static int sensorsNumber;
|
||||
static int slidingWindowSize;
|
||||
|
||||
typedef struct {
|
||||
float mean;
|
||||
float standardDeviation;
|
||||
int possibleFaultySensor;
|
||||
} Metrics;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user