[Xastir-dev] Broken station location

Curt, WE7U archer at eskimo.com
Thu Apr 1 15:28:55 EST 2004


On Thu, 1 Apr 2004, Chris Bell wrote:

> I found this bug on my own yesterday (Makes a really pretty picture
> watching your station jump around randomly in a 10 mile square box on
> the way home... I saved a png).

Is it as pretty as the APRS Flower?  You know, the flower design you
get when a mobile and a base station share the same callsign.


> My temporary fix was to add a '/10'
> after the multiply by 6.  I have not tested your fix yet, but an
> interesting side effect of the rounding is that the conversions are
> not exact anymore (degrees<->long) so things wander around now.  I
> have a bunch of 'items' that I use as waypoints, and they now have
> trails!  Nothing like when we had the x10 factor wrong... ouch!  I
> think the proper way to fix this is to see if we have a fourth digit,
> and then do the extra x0.6 addition, otherwise leave it alone.

The latest code ends up appending zeroes to the end and then forcing
a '\0' at the fifth position, then doing a multiply by six, divide
by 10, and adding 0.5.  It then truncates it into a long.  That
gives you repeatable rounding I think.  Correct me if I'm wrong.

--
Curt, WE7U			    archer at eskimo dot com
Arlington, WA, USA		http://www.eskimo.com/~archer
"Lotto:    A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir-dev mailing list