Potential fix for georef on the RadarProcessor

This commit is contained in:
April 2022-11-13 15:32:14 -07:00
parent 0f003fee91
commit cfca3d718a
No known key found for this signature in database
GPG Key ID: 17A9A017FAA4DE5E

View File

@ -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))
)
)