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
GPS Longitude
Moderator: Benj
-
wayne millard
- Posts: 234
- Joined: Thu May 31, 2007 2:18 pm
- Has thanked: 7 times
- Been thanked: 12 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: GPS Longitude
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel