Projet

Général

Profil

« Précédent | Suivant » 

Révision 325

implantation de la fonction calcul_vitesse

Voir les différences:

branch/MARIMOUTOU_Mourougen/main.c
float decode_trame(char *trame,Position P)
{
int i;
if(trame_cmp(trame[i],"GPPGA")==1)
if(trame_cmp(trame,"GPPGA")==1)
{
decode_position(trame[i],&P);
decode_position(trame,&P);
return 1;
}
}
......
return D;
}
float calcul_vitesse(Position p_1,Position p_2)
{
int R_terre=6371;
float Vitesse=(calcul_distance(p_1,p_2)*R_terre)/3600;
return Vitesse;
}
//
//Fonction ? modifier !!!!!
......
printf("%f\n",decode_longitude("$GPGGA,141914.00,4545.0000,N,00306.6036,E,1,05,3.4,499.3,M,,M,,*7D"));*/
Position pos;
/*printf("Latitude: %f Longitude: %f\n",decode_position("$GPGGA,141914.00,4545.0000,N,00306.6036,E,1,05,3.4,499.3,M,,M,,*7D",&pos));*/
printf("Latitude: %f Longitude: %f\n",decode_trame(trames,pos));
//printf(decode_trame("$GPGGA,141914.00,4545.0000,N,00306.6036,E,1,05,3.4,499.3,M,,M,,*7D",pos));
/*if (decode_trame("$GPGGA,141914.00,4545.0000,N,00306.6036,E,1,05,3.4,499.3,M,,M,,*7D",pos)!=1){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}
if (decode_trame("$GPGGA,141917.00,4545.0726,N,00306.6039,E,1,05,3.4,499.6,M,,M,,*73",pos)!=1){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}
if (decode_trame("$GPGGA,141915.00,4545.0242,N,00306.6039,E,1,05,3.4,499.5,M,,M,,*75",pos)!=1){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}
if (decode_trame("$GPRMC,141916.00,A,4545.6422,N,00306.6037,E,0.1,211.1,010206,,*3B",pos)!=1){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}*/
//printf()
}
// Ne pas modifier cette fonction

Formats disponibles : Unified diff