Page 1 of 1

GPS Longitude

Posted: Fri Mar 12, 2010 3:43 pm
by wayne millard
Hi Benj,

Thanks for the help.

i get a problem with Longitude reading some of the time it reads 0.1087 which is correct and then some times 0.0087.
i have 12 satellites being received. latitude reads good all the time.

Thanks,
Wayne

Re: GPS Longitude

Posted: Fri Mar 12, 2010 4:05 pm
by Benj
Hello Wayne

I too am getting this problem and I think that it is down to a rounding error in BoostC. The input coordinate must be changing ever so slightly and this is being multiplied into a big rounding error.

To get around this you could try adding this C code in a C code icon at the start of your program

float_detect_tininess = x;

Where x represents the following:

float_tininess_after_rounding = 0
float_tininess_before_rounding = 1

If this doesn't help then you could change to the HiTech compiler that handles Floating point nativley. This way you can also get away with not using the float manipulation functions.