[ gpsdrive ] No developer question, but a question about an older version of gpsdrive
Sascha Silbe
sascha-ml-gis-gpsdrive at silbe.org
Mon Nov 5 04:15:44 AKST 2007
On Sun, Nov 04, 2007 at 01:05:26AM +0100, Thomas Schönhütl wrote:
#define ROUTEREACH
(((1/600)*groundspeed*groundspeed+(1/20)*groundspeed+(25/3))*groundspeed/(3600*milesconv))
#define ROUTEREACH
(((1/42000)*groundspeed*groundspeed*groundspeed-(1/280)*groundspeed*groundspeed+(44/105)*groundspeed)*groundspeed/(3600*milesconv))
> - I doubled the ROUTEREACH and recompiled gpsdrive
> - then I did the same run and now the result was nearly PERFECT!!!
In the SVN version, current.groundspeed is a floating-point number.
Perhaps it's an integer in the older version? In that case the cubic
part could overflow, giving you nonsense as result. You could try
writing "(double)" (including the parentheses, but not the quotation
marks) before each "groundspeed".
You could also add a printf() call to output groundspeed and ROUTEREACH,
so we could should whether it's in the calculation or somewhere else.
CU Sascha
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.gpsdrivers.org/pipermail/gpsdrive/attachments/20071105/f67b2a79/attachment.bin
More information about the GPSdrive
mailing list