From a35691bf599688a863f4e90865a78c4e2a133f49 Mon Sep 17 00:00:00 2001 From: Chris Pham Date: Thu, 18 Jan 2018 13:07:21 -0800 Subject: [PATCH] Fix self in pixel_to_lon helper --- ground_station/resources/core/mapping.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ground_station/resources/core/mapping.py b/ground_station/resources/core/mapping.py index 648c035..d45cf0a 100644 --- a/ground_station/resources/core/mapping.py +++ b/ground_station/resources/core/mapping.py @@ -66,6 +66,7 @@ class GMapsStitcher(object): self.zoom = zoom self.maptype = maptype self.radius_meters = radius_meters + self.num_tiles = num_tiles def _new_image(self): return PIL.Image.new('RGB', (self.width, self.height)) @@ -109,6 +110,6 @@ class GMapsStitcher(object): def _pixels_to_lon(self, iterator, lon_pixels): # Magic Lines, no idea - degrees = _pixels_to_degrees(((iterator) - self.num_tiles / 2) * _TILESIZE, self.zoom) + degrees = self._pixels_to_degrees(((iterator) - self.num_tiles / 2) * _TILESIZE, self.zoom) return math.degrees((lon_pixels + degrees - _EARTHPIX) / _pixrad) - +