I might not have posted this in the right section but I couldn't see a section for general code questions.
So the problem I am having is this:
I have a number of gps coordinates which I am plotting, I am able to fit the plotted route to within the card width (320px) using:
Code: Select all
NewValue = (((OldValue - OldMin) * (NewMax - NewMin)) / (OldMax - OldMin)) + NewMin
Code: Select all
put (((xLoc - tMin) * (320-0)) / (tMax - tMin)) + 0 into xLocNew
If I use the same method above and remap the maximum and minimum longitude coordinates to the height of the card(480px) and 0 then the plotted gps route will look stretched.
I thought about remapping them to the same scale (0 -320) as the latitude values which gives a better result but I still don't think it is correct.