You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using gpx only and I use circuit_map because I need only path without anything else.
While testing the maps, I found that the aspect ratios or maybe sizing in general are wrong for circuit_map and cairo_circuit_map, but are correct for journey_map.
On the pic below, on the right, we have the route in Google Earth Pro imported from the same .gpx file as the gopro-dashboard-overlay uses.
On the left we have:
red line - journey_map - correct size/aspect ration (as in google)
yellow line - cairo_circuit_map - wrong aspect ratio
black line (90 off normal) - circuit_map - also wrong aspect (as you see).
For circuit_map the orientation issue is in /gopro_overlay/widgets/map.py. Specifically the function scale() on line 299.
Here, x and y need to be swapped. Furthermore the 'y' axis on a map (latitude) is from bottom to top, whereas the y-axis in an image is from top to bottom, so this needs to be corrected as well.
This can be fixed as follows:
def scale(self, point):
x = int(self.dimensions.x - (((point.lat - self.bbox.min.lat) / self.size.x) * self.dimensions.x) - self.dimensions.x / 20)
y = int((((point.lon - self.bbox.min.lon) / self.size.y) * self.dimensions.y) + self.dimensions.y / 20)
return y, x
What this does not fix is the aspect ratio. The gps trace is simply fitted to a square. Fixing that needs a whole bunch more code. One degree difference in latitude is not the same distance as one degree difference in longitude and there's no fixed ratio between them as that depends on where you are in the world. It might be easier to adapt the journey_map widget with the option to not actually have a map but just show the gps trace. I have not attempted that.
Hi.
I'm using gpx only and I use circuit_map because I need only path without anything else.
While testing the maps, I found that the aspect ratios or maybe sizing in general are wrong for circuit_map and cairo_circuit_map, but are correct for journey_map.
On the pic below, on the right, we have the route in Google Earth Pro imported from the same .gpx file as the gopro-dashboard-overlay uses.
On the left we have:
red line - journey_map - correct size/aspect ration (as in google)
yellow line - cairo_circuit_map - wrong aspect ratio
black line (90 off normal) - circuit_map - also wrong aspect (as you see).
Where in your code shall I look to correct these?
Here is the layout file:
thank you
The text was updated successfully, but these errors were encountered: