From cfca3d718af3685dfd4fa6a57323aa702f8d8414 Mon Sep 17 00:00:00 2001 From: April Date: Sun, 13 Nov 2022 15:32:14 -0700 Subject: [PATCH] Potential fix for georef on the RadarProcessor --- radar/RadarProcessor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/radar/RadarProcessor.py b/radar/RadarProcessor.py index 9e1967b..65d62bf 100644 --- a/radar/RadarProcessor.py +++ b/radar/RadarProcessor.py @@ -55,8 +55,8 @@ def WorldCoordinateToTile(coord: Point) -> Point: scale = 1 << 6 return Point( - x = math.floor(coord.x * scale / 256), - y = math.floor(coord.y * scale / 256) + x = math.floor(coord.x * scale / 255), + y = math.floor(coord.y * scale / 255) ) def WorldCoordinateToPixel(coord: Point) -> Point: @@ -68,10 +68,10 @@ def WorldCoordinateToPixel(coord: Point) -> Point: ) def LatLongProject(lat, long) -> Point: - siny = math.sin(lat * math.pi / 185) + siny = math.sin(lat * math.pi / 180) siny = min(max(siny, -0.9999), 0.9999) return Point( x = 256 * (0.5 + long / 360), y = 256 * (0.5 - math.log((1 + siny) / (1 - siny)) / (4 * math.pi)) - ) + ) \ No newline at end of file