Révision 157
Ajouté par Victor SOUDY il y a environ 3 ans
main.c | ||
---|---|---|
"$GPVTG,99.4,T,,M,0.4,N,0.7,K*57",
|
||
"$GPZDA,141914.00,01,02,2006,00,00*69",
|
||
0};
|
||
// structure
|
||
typedef struct
|
||
{
|
||
float longitude;
|
||
float latitude;
|
||
}position;
|
||
|
||
|
||
|
||
|
||
//fcts ajout?s
|
||
int trame_cmp(char*trame,char*type)
|
||
{
|
||
int i;
|
||
... | ... | |
return longdeg;
|
||
}
|
||
|
||
void coordonnee_to_float (char*trame,position pos)
|
||
{
|
||
pos.latitude=lat_to_float(trame);
|
||
pos.longitude=long_to_float(trame);
|
||
return 0;
|
||
}
|
||
|
||
|
||
|
||
//Fonction ? modifier !!!!!754198
|
||
void traitement(char*trame)
|
||
... | ... | |
trame_cmp(trame,"GPGGA");
|
||
if (trame_cmp(trame,"GPGGA")==1)
|
||
{
|
||
printf("%f\n",lat_to_float(trame));
|
||
printf("%f\n",long_to_float(trame));
|
||
position pos;
|
||
printf("%f\n%f\n",coordonnee_to_float(trame,pos)); // comment printf le resultat d'une proc?dure en C ?
|
||
printf ("> %s\n",trame);
|
||
}
|
||
|
Formats disponibles : Unified diff
question 10 problème pour afficher le résultat de la procédure afin de vérifier.