PDA

View Full Version : Moon Phase, Rise, and Set Times


fppf
09-24-2005, 12:30 AM
I'm working on the timer part of my tank controler and I added the sun rise/set easy. Basiclly the sun will rise and set at almost the same times from year to year. The micro I'm using can't do floating point math so I will be using lookup tables for the year of rise and set times.

Now the Moon is a whole other story. The Luner phase cycles is not bad, it happens on an almost linear periodic function. Its the rise and set times that are a headach. How important do you think accurite rise and set times are for the moon. I will be simulating moon lighting in hopes of spawning someday. But just because there is a full moon does not mean its visable. There are times the moon will not rise and also not set.

Doing the rise/set calculations for the Moon are VERY in depth. Its not on a nice orbiting plain with the earth so you need to account for the parallax and a whole bunch of other stuff. Needless to say, its not a problem that can be put simply into a lookup table. So what do you think? If needed how close does it need to be??

Thoughts?

MikeS
09-24-2005, 01:11 AM
hmmm....that's a tough one...

first...I'd think that putting them on a new moon/full moon type schedule would be enough, that's a lot more than most other people usually do for sure...

Here's something you can try...go to a website about weather, in the almanac section they sometimes have data on moonrise and moonset (at least I think they do) and you could make a chart from that...if not a weather site, I bet a quick google would turn up a website that would have the data you are seeking...

Mike

fppf
09-24-2005, 01:28 AM
Oh, calculating Sun rise/set, Moon rise/set, and Moon Phase is not a problem. I already have software written to do all that, however it needs to be done in floating point. Its easy for a PC to run the calculations, but the little micro I'm using just does not have the math power to do it.

I was thinking about changing my micro, but that would trash all the design and code work already done.