GPS Longitude

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
wayne millard
Posts: 234
Joined: Thu May 31, 2007 2:18 pm
Has thanked: 7 times
Been thanked: 12 times

GPS Longitude

Post 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

User avatar
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

Post 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.

Post Reply