Révision 99
Ajouté par Mourougen MARIMOUTOU-POUGARY il y a environ 3 ans
main.c | ||
---|---|---|
|
||
}
|
||
|
||
/*int test_decode_latitude()
|
||
float decode_longitude(char *trame )
|
||
{
|
||
int verif=1;
|
||
if(decode_latitude("$GPGGA,141914.00,4545.0000,N,00306.6036,E,1,05,3.4,499.3,M,,M,,*7D")!=45.75)
|
||
{
|
||
verif=0;
|
||
}
|
||
float degres,reste,flottant,res;
|
||
int i=30;
|
||
degres=decode_nombre(trame,i+2,i);
|
||
reste=decode_nombre(trame,i+3,i+2);
|
||
flottant=decode_nombre(trame,i+10,i+5);
|
||
|
||
return verif;
|
||
res=degres+((reste+(flottant/10000))/60);
|
||
return res;
|
||
|
||
}*/
|
||
}
|
||
|
||
|
||
//
|
||
|
||
//Fonction ? modifier !!!!!
|
||
... | ... | |
printf("%d\n",decode_nombre("4545",3,0));
|
||
|
||
printf("%f\n",decode_latitude("$GPGGA,141914.00,4545.0000,N,00306.6036,E,1,05,3.4,499.3,M,,M,,*7D"));
|
||
printf("%f\n",decode_longitude("$GPGGA,141914.00,4545.0000,N,00306.6036,E,1,05,3.4,499.3,M,,M,,*7D"));
|
||
|
||
|
||
}
|
Formats disponibles : Unified diff
Implementation et test de decode_longitude