Closed IanMayo closed 6 years ago
@purvil12c - to do the re-projection properly our code needs to know the dimensions of the source screen.
The attached GPX file includes a height/width, right at the end.
I'd be grateful if you could switch to using this file.
So. To put our track line into the rectangle, we need to do this:
intoRectangle
function provided above.
Our rectangle looks like this:
So, we have the offset (location) of the top-left corner, plus it's height and width.
We'll have to use these values to shift our coordinates to the right place inside the rectangle.
I think it will be something like this:
Here is a spreadsheet that validates the above algorithm.