Log measurements on SD card added on DISCO-L476VG board acceleration, omega, compass & 5 Analog values
Dependencies: BSP_DISCO_L476VG COMPASS_DISCO_L476VG ConfigFile GYRO_DISCO_L476VG SDFileSystem mbed
Mesure/Mesure.h@2:f53340e49cc0, 2016-02-13 (annotated)
- Committer:
- flowh
- Date:
- Sat Feb 13 14:48:40 2016 +0000
- Revision:
- 2:f53340e49cc0
- Parent:
- 1:e1f3b4b8b99b
Save on SD Card at up to at least 100Hz Acceleration, rotation velocity, compass and 5 AI
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
flowh | 0:0861bf46efe4 | 1 | #include "mbed.h" |
flowh | 0:0861bf46efe4 | 2 | #include "COMPASS_DISCO_L476VG.h" |
flowh | 1:e1f3b4b8b99b | 3 | #include "GYRO_DISCO_L476VG.h" |
flowh | 0:0861bf46efe4 | 4 | |
flowh | 0:0861bf46efe4 | 5 | #ifndef MESURE_H |
flowh | 0:0861bf46efe4 | 6 | #define MESURE_H |
flowh | 1:e1f3b4b8b99b | 7 | #define NbDAC 5 |
flowh | 1:e1f3b4b8b99b | 8 | /*--------------------------------------------- |
flowh | 1:e1f3b4b8b99b | 9 | Manage acquisitions |
flowh | 1:e1f3b4b8b99b | 10 | Compass |
flowh | 1:e1f3b4b8b99b | 11 | Acceleration |
flowh | 1:e1f3b4b8b99b | 12 | Gyroscope |
flowh | 1:e1f3b4b8b99b | 13 | |
flowh | 1:e1f3b4b8b99b | 14 | !!! calibration to be defined in the constructor !!! |
flowh | 0:0861bf46efe4 | 15 | |
flowh | 1:e1f3b4b8b99b | 16 | */ |
flowh | 0:0861bf46efe4 | 17 | |
flowh | 0:0861bf46efe4 | 18 | class tMesure |
flowh | 0:0861bf46efe4 | 19 | { |
flowh | 0:0861bf46efe4 | 20 | public: |
flowh | 1:e1f3b4b8b99b | 21 | tMesure(COMPASS_DISCO_L476VG * apCompass, GYRO_DISCO_L476VG * apGyro, AnalogIn * apAIn[NbDAC]); |
flowh | 0:0861bf46efe4 | 22 | |
flowh | 0:0861bf46efe4 | 23 | void Update(); |
flowh | 0:0861bf46efe4 | 24 | void Save(FILE * apFile); |
flowh | 0:0861bf46efe4 | 25 | |
flowh | 0:0861bf46efe4 | 26 | private: |
flowh | 0:0861bf46efe4 | 27 | COMPASS_DISCO_L476VG * pCompass; |
flowh | 1:e1f3b4b8b99b | 28 | GYRO_DISCO_L476VG * pGyro; |
flowh | 0:0861bf46efe4 | 29 | |
flowh | 0:0861bf46efe4 | 30 | double Mag[3]; |
flowh | 0:0861bf46efe4 | 31 | double Acc[3]; |
flowh | 1:e1f3b4b8b99b | 32 | double Omega[3]; |
flowh | 1:e1f3b4b8b99b | 33 | double AIO[NbDAC]; |
flowh | 0:0861bf46efe4 | 34 | |
flowh | 0:0861bf46efe4 | 35 | double OffsetMag[3]; |
flowh | 0:0861bf46efe4 | 36 | double OffsetAcc[3]; |
flowh | 1:e1f3b4b8b99b | 37 | double OffsetOmega[3]; |
flowh | 1:e1f3b4b8b99b | 38 | double OffsetAIO[NbDAC]; |
flowh | 0:0861bf46efe4 | 39 | |
flowh | 0:0861bf46efe4 | 40 | double GainMag[3]; |
flowh | 0:0861bf46efe4 | 41 | double GainAcc[3]; |
flowh | 1:e1f3b4b8b99b | 42 | double GainOmega[3]; |
flowh | 1:e1f3b4b8b99b | 43 | double GainAIO[NbDAC]; |
flowh | 0:0861bf46efe4 | 44 | |
flowh | 1:e1f3b4b8b99b | 45 | AnalogIn * pAIn[NbDAC]; |
flowh | 0:0861bf46efe4 | 46 | |
flowh | 0:0861bf46efe4 | 47 | }; |
flowh | 0:0861bf46efe4 | 48 | #endif |