mirror of
https://github.com/mewtek/i2ME-Legacy.git
synced 2025-05-11 00:57:31 -05:00
Potential fix for georef on the RadarProcessor
This commit is contained in:
parent
0f003fee91
commit
cfca3d718a
@ -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))
|
||||
)
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user