calculate
Dependencies: mbed X_NUCLEO_IKS01A3 Mahony_Algorithm
CalculateData.h
- Committer:
- zollecy1
- Date:
- 2020-04-24
- Revision:
- 4:7d13076ecece
- Parent:
- 3:795998b31c32
- Child:
- 5:62994bb9fff9
File content as of revision 4:7d13076ecece:
/** |**********************************************************************; * Project : Projektarbeit Systemtechnik PES4 * * Program name : Beispiel * * Author : PES4 Team1 * * Team : **Team 1** * Fabio Bernard * Lukas Egli * Matthias Ott * Pascal Novacki * Robin Wanner * Vincent Vescoli * Cyrill Zoller * * Date created : 20.02.2020 * * Purpose : Beispiel * |**********************************************************************; **/ #ifndef CALCULATEDATA_H #define CALCULATEDATA_H #include "mbed.h" #include "XNucleoIKS01A3.h" #include "Liste.h" #include "MahonyAHRS.h" class CalculateData { public: CalculateData(PinName Pin0, PinName Pin1, PinName Pin2, PinName Pin3, PinName Pin4, PinName Pin5, PinName Pin6); //Constructor virtual ~CalculateData(); void enable(); void disable(); void getValue(Liste *list); void update(); private: void integrate(double *x, double *x_old, double *y, double t, double t_old); //void transform(int *acc, int *angle); void filterAcc(int array[3][30],int index, double *target); void filterGyro(int array[3][30],int index, double *target); void filterSpeed(double *array, double *target); void run(); Thread thread; Timer timer; MahonyAHRS *mahony; int array_acc[3][100]; //Matrix periodic Sensor Data int array_gyro[3][100]; //Matrix periodic Sensor Data int array_mag[3][100]; //Matrix periodic Sensor Data int counter; //count Matrix records bool periodic_task; //boolean periodic condition double acc[3]; double gyro[3]; double acc_old[3]; double gyro_old[3]; double speed[3]; double speed_old[3]; double angle[3]; double pos[3]; double t[30]; double t_old; }; #endif