PDA

View Full Version : Calculating Sunrise and Sunset



CocaColaKid
- 21st November 2007, 14:32
Has anyone ever calculated the sunrise and sunset times using a PIC?

dhouston
- 21st November 2007, 16:10
Has anyone ever calculated the sunrise and sunset times using a PIC?
I haven't done it with a PIC but have done it for ZBasic (an advanced clone of the BasicStamp). You maybe can convert my ZBasic code to PBP although it requires single precision floats. The board appears to be setup improperly and chokes on the < when entered as CODE so I have attached a ZIP which includes the procedure I call at midnight. The last 8 lines are for related things but are not needed for dawn/dusk. You'll need to calculate the day of the year yourself. I get it from the ZBasic API.

sayzer
- 21st November 2007, 16:56
Has anyone ever calculated the sunrise and sunset times using a PIC?

There are already some ready codes around ; made for Islamic prayer times.

Its calculation includes Sunset and Sunrise.

===================

Note: I think I had posted some examples before.(not sure)