Calculating Sunrise and Sunset


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default Calculating Sunrise and Sunset

    Has anyone ever calculated the sunrise and sunset times using a PIC?

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by CocaColaKid View Post
    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.
    Attached Files Attached Files

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by CocaColaKid View Post
    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)
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts