diff --git a/loc-bts/rtapaggregate/rtapaggregate.h b/loc-bts/rtapaggregate/rtapaggregate.h index 0890d86..0f3918a 100644 --- a/loc-bts/rtapaggregate/rtapaggregate.h +++ b/loc-bts/rtapaggregate/rtapaggregate.h @@ -9,6 +9,9 @@ #include "../../librtaputil/rtaputil.h" +//#define TIMESTAMP // Décommenter pour afficher le timestamp à chaque ligne du fichier de sortie. + + #define AGGREGATE_TIMEOUT 1500 // Timeout d'agrégation (en millisecondes) #define KEEP_TIMEOUT 3000 // Temps que l'on conserve les données dans la liste (en millisecondes) #define CHECK_INTERVAL 500000 // Temps entre deux vérifications de la liste (en micro-secondes) diff --git a/loc-bts/rtapaggregate/rtapaggregated.c b/loc-bts/rtapaggregate/rtapaggregated.c index a13846f..a3e19ac 100644 --- a/loc-bts/rtapaggregate/rtapaggregated.c +++ b/loc-bts/rtapaggregate/rtapaggregated.c @@ -148,6 +148,9 @@ void* monitor_couple_list(couple_list **couples) putchar('\n') ; #endif +#ifdef TIMESTAMP + fprintf(fd, "%llu;", timeval_to_ms(couple_ptr->request_time)) ; // Inscription de la date de la demande (sur le mobile) dans le fichier +#endif // TIMESTAMP fprintf(fd, "%0.2f;%0.2f;%0.2f;%hhd", couple_ptr->x_position, couple_ptr->y_position, couple_ptr->z_position, couple_ptr->direction) ; // Inscription des infos du couple dans le fichier couple_info_ptr = couple_ptr->info ;