Révision 633
Ajouté par malameynar il y a presque 4 ans
branch/lameynardie/sp4a12/main.c | ||
---|---|---|
deg=decode_nombre(ch,3)*1000000;
|
||
min=(decode_nombre(ch,9)-deg)/60;
|
||
lon=deg/1000000+min/10000;
|
||
if((ch[9]=='O')){
|
||
if((ch[9]=='W')){
|
||
lon=-lon;
|
||
}
|
||
return (lon);
|
||
}
|
||
long lon_vf(char * ch){
|
||
long deg;
|
||
long min;
|
||
long lon=0;
|
||
deg=decode_nombre(ch,3);
|
||
min=(decode_nombre(ch,9)-deg*1000000);
|
||
lon=deg*46603+min*777;
|
||
if((ch[9]=='W')){
|
||
lon=-lon;
|
||
}
|
||
return (lon);
|
||
}
|
||
|
||
float lat_float(char * ch){
|
||
float deg;
|
||
... | ... | |
return (lat);
|
||
}
|
||
|
||
long lat_vf(char * ch){
|
||
long deg;
|
||
long min;
|
||
long lat=0;
|
||
deg=decode_nombre(ch,2);
|
||
min=(decode_nombre(ch,9)-deg*1000000);
|
||
lon=deg*46603+min*777;
|
||
if((ch[8]=='S')){
|
||
lat=-lat;
|
||
}
|
||
return (lon);
|
||
}
|
||
|
||
float lat_long(char* ch){
|
||
if (decode_int(ch[8])==-1){
|
||
return(lat_float(ch));
|
Formats disponibles : Unified diff
fonctions entières