Projet total V1

Dependencies:   mbed

Committer:
Paolo804
Date:
Wed Jun 15 09:00:08 2016 +0000
Revision:
0:eac65d0c5a1c
Projet total V1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Paolo804 0:eac65d0c5a1c 1 #include "mbed.h"
Paolo804 0:eac65d0c5a1c 2 #define NB_VALEURS 280
Paolo804 0:eac65d0c5a1c 3 #define NB_VALEURS_BIT 36
Paolo804 0:eac65d0c5a1c 4 #define NB_VALEURS_MOYENNE_HAUTE 10
Paolo804 0:eac65d0c5a1c 5
Paolo804 0:eac65d0c5a1c 6
Paolo804 0:eac65d0c5a1c 7 struct distance{
Paolo804 0:eac65d0c5a1c 8 float max;
Paolo804 0:eac65d0c5a1c 9 float min;
Paolo804 0:eac65d0c5a1c 10 float moyenne;
Paolo804 0:eac65d0c5a1c 11 float ecart;
Paolo804 0:eac65d0c5a1c 12 float rapport;
Paolo804 0:eac65d0c5a1c 13 };
Paolo804 0:eac65d0c5a1c 14
Paolo804 0:eac65d0c5a1c 15 struct maximum{
Paolo804 0:eac65d0c5a1c 16 float valeur;
Paolo804 0:eac65d0c5a1c 17 int indice;
Paolo804 0:eac65d0c5a1c 18 };
Paolo804 0:eac65d0c5a1c 19
Paolo804 0:eac65d0c5a1c 20 struct minimum{
Paolo804 0:eac65d0c5a1c 21 float valeur;
Paolo804 0:eac65d0c5a1c 22 int indice;
Paolo804 0:eac65d0c5a1c 23 };
Paolo804 0:eac65d0c5a1c 24
Paolo804 0:eac65d0c5a1c 25 struct signal_caracteristiques{
Paolo804 0:eac65d0c5a1c 26 int indice_max;
Paolo804 0:eac65d0c5a1c 27 int indice_moyenne;
Paolo804 0:eac65d0c5a1c 28 int indice_ecart;
Paolo804 0:eac65d0c5a1c 29 int indice_rapport;
Paolo804 0:eac65d0c5a1c 30 };
Paolo804 0:eac65d0c5a1c 31
Paolo804 0:eac65d0c5a1c 32
Paolo804 0:eac65d0c5a1c 33 //Fonctions pour les paramètres distance
Paolo804 0:eac65d0c5a1c 34 void init_tab_max(struct maximum tab[3], float acquisition);
Paolo804 0:eac65d0c5a1c 35
Paolo804 0:eac65d0c5a1c 36 void init_tab_min(struct minimum tab[3], float acquisition);
Paolo804 0:eac65d0c5a1c 37
Paolo804 0:eac65d0c5a1c 38 bool appartient_max(int i, struct maximum tab_max[3]);
Paolo804 0:eac65d0c5a1c 39
Paolo804 0:eac65d0c5a1c 40 bool appartient_min(int i, struct minimum tab_min[3]);
Paolo804 0:eac65d0c5a1c 41
Paolo804 0:eac65d0c5a1c 42 void have_max(float tab[NB_VALEURS], struct maximum tab_max[3]);
Paolo804 0:eac65d0c5a1c 43
Paolo804 0:eac65d0c5a1c 44 void have_min(float tab[NB_VALEURS], struct minimum tab_min[3]);
Paolo804 0:eac65d0c5a1c 45
Paolo804 0:eac65d0c5a1c 46 //Fonctions de calcul de la distance
Paolo804 0:eac65d0c5a1c 47 float abs_minus(float a, float b);
Paolo804 0:eac65d0c5a1c 48
Paolo804 0:eac65d0c5a1c 49 void init_struct(struct signal_caracteristiques tableau);
Paolo804 0:eac65d0c5a1c 50
Paolo804 0:eac65d0c5a1c 51 void verifff(struct distance signal, struct distance donnee[], struct signal_caracteristiques *signal_carac);
Paolo804 0:eac65d0c5a1c 52
Paolo804 0:eac65d0c5a1c 53 void printf_SC(struct signal_caracteristiques sig);
Paolo804 0:eac65d0c5a1c 54
Paolo804 0:eac65d0c5a1c 55 int calcul_distance_V1(struct distance signal, struct distance donnee[], struct signal_caracteristiques caracteristiques);
Paolo804 0:eac65d0c5a1c 56
Paolo804 0:eac65d0c5a1c 57 float convert_indice(int indice);
Paolo804 0:eac65d0c5a1c 58
Paolo804 0:eac65d0c5a1c 59 float calcul_distance_V2(struct distance signal, struct signal_caracteristiques caracteristiques);