elonen / js-sky-sim

Accurate realtime sky color simulation in Javascript
MIT License
16 stars 1 forks source link

Wrong timezone conversion to radian #1

Open pham-tuan-binh opened 3 years ago

pham-tuan-binh commented 3 years ago

I believe you forgot to multiply the timezone by 15 before converting it to radian.

Line 164 in sky-sim.html: var time_zone_meridian = deg2rad(parseFloat($('#tz_sm').val()));

There were also some unused variables in your code, like "tz_offset", which I believe was faulty because of the wrong timezone calculation.

Anyway, super kudos for your amazing project.

elonen commented 3 years ago

If you have a tested patch / pull request, I'd appreciate it! I wrote this for one art project and haven't really touched it since.