Projet

Général

Profil

« Précédent | Suivant » 

Révision 44

Ajouté par Stephen LOPEZ il y a environ 3 ans

question 9 implantation fonction longitude terminée

Voir les différences:

branch/LOPEZ_Stephen/tp_sp4_2022_LOPEZ_Stephen/sp4a12/main.c
deg = decode_nombre(&ch[17],2)+(decode_nombre(&ch[17+2],2)/60)+(decode_nombre(&ch[17+5],4)/600000);
return deg;
}
float longitude (char *ch)
{
float degr;
degr = decode_nombre(&ch[29],3)+(decode_nombre(&ch[29+3],2)/60)+(decode_nombre(&ch[29+6],4)/600000);
return degr;
}
//Ajouter vos tests unitaires dans cette fonction.
void tests_unitaires(void){
/*
......
printf ("Erreur Test unitaire latitude.\n");
exit(-1);
}
*/
if (longitude("$GPGGA,141921.00,4545.1610,N,00306.6043,E,1,05,3.4,499.8,M,,M,,*7C")-3.110071667>0.01){
printf ("Erreur Test unitaire latitude.\n");
exit(-1);
}
*/
}

Formats disponibles : Unified diff