StrandedKitty / streets-gl

🗺 OpenStreetMap 3D renderer powered by WebGL2
http://streets.gl
MIT License
658 stars 49 forks source link

Sun in unrealistic positions when time of day is not set to dynamic #125

Open tguen opened 1 year ago

tguen commented 1 year ago

Describe the bug Edited because I don't know how the sun moves apparently

When time of day is set to morning, the sun appears high in the sky to the Northeast. When set to noon, the sun still appears in the North. This doesn't happen at latitudes above about 25 AFAIK. The Southern hemisphere also has the sun in the South when time is set to evening.

Expected behavior Sun should be at realistic position for current latitude.

Map location https://streets.gl/#59.31808,18.07854,42.00,47.50,1738.56

Screenshots Stockholm Screenshot 2023-05-26 at 21-01-25 Streets GL

System information

Additional context According to https://sun-direction.com, if at Null Island, the morning & noon settings would be accurate around June, and the evening position would be accurate around December. Maybe lat/lon is not being properly accounted for?

StrandedKitty commented 1 year ago

TODO: use mourner/suncalc to calculate presets for a specific location on the map