Projet

Général

Profil

« Précédent | Suivant » 

Révision 344

debut tp2

Voir les différences:

branch/papa_ndiaye/sp4a12/main.c
#include <math.h>
#include "trame.h"
#define nbtrames 8
struct Position{
float lattitude;
float longitude;
};
//Trames de tests ? modifier si n?cessaire.
char * trames[]= {"$GPGSV,3,2,10,15,03,077,,18,04,041,42,19,85,271,,20,08,214,*7C",
"$GPGSV,3,3,10,22,39,053,50,28,15,320,*7E",
......
s3=s3+ decode_int(ch[i])*pow(10,pos+6-i)/3600;
return s=s1+s2+s3 ;
}
}
//Fonction ? modifier !!!!!
void traitement(char * trame)
{
......
}
}
int decode_trame(char *trame, struct Position *p)
{
int a=0,s=1;
float r=0,q=0;
a= trame_cmp((trame),"GPGGA");
r=decode_longitude(trame);
q=decode_lattitude(trame);
if(s!=1 || r!=*(p).lattitude || q!=*(p).longitude);
}
void test_decode_int(void)
{
if (5!=5){

Formats disponibles : Unified diff