Hi
i’m using MC60 gps and i receive lat and lon successfully , but the location i that get have at least 6km diffrance with my location!
my antenna is pointing directly to the sky with nothing above it.also i tested it with different active antennas.
how can i fix it??
Update: i test gps in another location but the mc60 lat and lon shows somewhere around previous wrong location !
Problem Solved !
i didn’t convert my lat and lon correctly
Here’s how to do it :
float Ql_Lat(void){
if (RMC_BUFFER30] == 'A')
{
char lat[10];
float flat;
float mm_mmmm;
int c = 0, dd;
while (c < 9)
{
lat[c] = RMC_BUFFER[32 + c];
c++;
}
lat[c] = '\0';
Ql_sscanf(lat,"%2d%7f4", &dd, &mm_mmmm);
flat = dd + (mm_mmmm/60.0);
return flat;
}
else
{
return 0;
}
}
float Ql_Lon(void){
if (RMC_BUFFER[30] == 'A')
{
char lon[10];
float flon;
float mm_mmmm;
int c = 0 , ddd;
while (c < 10)
{
lon[c] = RMC_BUFFER[44 + c];
c++;
}
lon[c] = '\0';
Ql_sscanf(lon,"%3d%7f4", &ddd, &mm_mmmm);
flon = ddd + (mm_mmmm/60.0);
return flon;
}
else
{
return 0;
}
}
in this code we have two functions that gets information from $GNRMC buffer. first it checks that the GPS data is Valid or not , second it extracts lat and lon and then it returns the correct values. you can put it in google maps and see yot location.