Révision 378
Ajouté par lefraisse il y a plus de 4 ans
| branch/FRAISSE/sp4a12/main.c | ||
|---|---|---|
|
P->latitude+=(memorisation_latitude[i]-'0')*1/6*pow(10,-i+2);
|
||
|
}
|
||
|
|
||
|
//On transforme les notations S/N/E/O
|
||
|
//On d?code les notations S/N/E/O
|
||
|
if(memorisation_indic_latitude[0]=='S')
|
||
|
P->latitude = -P->latitude;
|
||
|
|
||
| ... | ... | |
|
exit(-1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void test_decode_trame(void){
|
||
|
Position *p;
|
||
|
if (decode_trame("$GPGLL,4545.6424,N,00306.6036,E,141914.00,A*0E",p)!=1){
|
||
|
printf("Erreur Test decode nombre decode_nombre.\n");
|
||
|
exit(-1);
|
||
|
}
|
||
|
if (decode_trame("$GPGGA,141914.00,4545.0000,N,00306.6036,E,1,05,3.4,499.3,M,,M,,*7D",p)!=1){
|
||
|
printf("Erreur Test decode nombre decode_nombre.\n");
|
||
|
exit(-1);
|
||
|
}
|
||
|
if (decode_trame("$GPZDA,141925.00,01,02,2006,00,00*6B",p)!=1){
|
||
|
printf("Erreur Test decode nombre decode_nombre.\n");
|
||
|
exit(-1);
|
||
|
}
|
||
|
if (decode_trame("$GPGSA,A,3,,03,,22,14,,01,,18,,,,3.9,3.4,1.9*39",p)!=1){
|
||
|
printf("Erreur Test decode nombre decode_nombre.\n");
|
||
|
exit(-1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Ne pas modifier cette fonction
|
||
|
int main(int argc,char ** argv)
|
||
Formats disponibles : Unified diff
Test decode_trame