[aprssig] Map Symbol Placement
Curt, WE7U
archer at eskimo.com
Thu Apr 19 11:32:08 EDT 2007
On Thu, 19 Apr 2007, M J wrote:
> I notice that within some APRS programs, it is necessary to
> identify two lat/lon points on a map, and link them to the
> corresponding map's pixels. Has anyone more publicly documented
> the equations used to plot a symbol on a map if you know the
> lat/lon that the symbol is supposed to appear on (once you know
> the previous info)? I'm interested in learning more about that.
> Thanks! MJ
I've worked on the code for this before. First the program
translates the pixels & locations you gave it to the pixels at
diagonal map corners. Once you have the new numbers you have the
beginning/ending latitude and longitude for the area the map covers,
assuming a rectangular map.
After that it's simple math to subtract min-lat from max-lat and
min-long from max-long, then each up by the number of pixels along
that dimension of the map.
Of course the fact that both lat and long can use negative numbers
complicates things slightly. For the Xastir project we translate
everything to our own coordinate system that uses only positive
numbers which makes this part easier.
--
Curt, WE7U. APRS Client Comparisons: 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 aprssig
mailing list