2022-06-15 11:57:15 +02:00
|
|
|
#include "initialParameters.h"
|
|
|
|
#include "fileGestion.h"
|
|
|
|
#include "getArray.h"
|
2022-06-15 15:45:14 +02:00
|
|
|
#include "growthRate.h"
|
2022-06-15 11:57:15 +02:00
|
|
|
/**
|
|
|
|
* @brief calculate de growth rate between to point next to each other
|
|
|
|
*
|
|
|
|
* @param dataArray array with data of points next to each other for each captor (dim : 2 * nCols)
|
|
|
|
* @param gRateArray array that contaigns results of the growth ratecalculation
|
|
|
|
*/
|
|
|
|
void growthRateCalculation(double **dataArray , double *gRateArray){
|
|
|
|
double gRate = 0;
|
|
|
|
for(int i = 0 ; i < nCol-1 ; i++){
|
|
|
|
gRate = (dataArray[1][i] - dataArray[2][i]) / period;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void growthRateFunction(double *dataLign){
|
|
|
|
double **dataArray;
|
|
|
|
//initialization + fill
|
|
|
|
double gRateArray[nCol-1];
|
|
|
|
growthRateCalculation(dataArray , gRateArray);
|
|
|
|
appendDataInFile("growthRate.csv",gRateArray , nCol-1);
|
|
|
|
}
|