erikflowers / weather-icons

215 Weather Themed Icons and CSS
https://github.com/erikflowers/weather-icons
6.94k stars 853 forks source link

Moon phase accuracy #153

Open joecreighton opened 8 years ago

joecreighton commented 8 years ago

This is rather pedantic.

I'm working on a moon phase widget and realized the icons don't sync because of the difference between a its sidereal month (27.3 days, or the same position in the sky) and its synodic month (29.5 days, or returning to the same phase).

I'm working on fudging the math so that the quarters hit every 7.3 days instead of "on the sevens" but I'm wondering if you'd ever consider rescaling the icons to get 30 out of the set instead of the current 28?

erikflowers commented 8 years ago

There’s probably no realistic chance I’ll redo them. If it were me, I’d just use two of the icons twice to make up for it. Ones that are almost indistinguishable like waxing-gibbous 3 and 4. You could pick one and map a new CSS class like “waxing-gibbous-3-4”. I am not even sure that all of the 7 icons for each “week” are actually different, so I don’t think anyone would notice, especially at the smaller sizes there’s little appreciable difference between adjacent moons.

I wish I had the time and energy to really maintain the set. I’d love for it to be perfect.

On April 2, 2016 at 6:41:34 PM, Joe Creighton (notifications@github.com) wrote:

This is rather pedantic.

I'm working on a moon phase widget and realized the icons don't sync because of the difference between a lunar sidereal month (27.3 days, or the same position in the sky) and a lunar synodic month (29.5 days, or the same phase).

I'm working on fudging the math so that the quarters hit every 7.3 days instead of "on the sevens" but I'm wondering if you'd ever consider rescaling the icons to get 30 out of the set instead of the current 28?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

joecreighton commented 8 years ago

Thanks for the response. If I figure out how to create icons from scratch, I just might step up.

As for my solution, I've spread the 28 days out by dividing the moon's age in days by 1.05 to get a better icon approximation. On paper, it looks like it will work pretty well. I'm just going to let the code simmer and run for a while.