Page 2 of 2

Re: Question about Sunrise & Sunset times

Posted: Fri 12 Feb 2016 7:32 pm
by water01
FWIW The 'Bashewa' astro script calculates MerPass of the sun, a big scipt if you just require one variable though
If I may ask where can this script be found and is it code I can use?

Re: Question about Sunrise & Sunset times

Posted: Fri 12 Feb 2016 10:11 pm
by jdc
Here is the .zip file.
In the head it states it is 'Free Software under the GNU General Public License' so I'm assuming it's OK to upload it here.

Re: Question about Sunrise & Sunset times

Posted: Wed 17 Feb 2016 10:31 pm
by RayProudfoot
I'm confused about the length of daylight and day length reported by Cumulus1.

I recently had help to add Local Noon to my site and as well as adding that feature I also used Dawn, Dusk, Sunrise and Sunset from the supplied php module replacing the Cumulus1 tags.

On this screenshot from today everything makes sense except Daylight and Day Length.
SunriseSunset.png
Assuming Day Length is the time between sunrise and sunset it should read 10 hours, not 11.

Daylight is also an hour too long assuming it's Dusk minus Dawn. It should be 11h 16m, not 12h 16m.

Any ideas why it's gone wrong?

Re: Question about Sunrise & Sunset times

Posted: Thu 18 Feb 2016 8:12 am
by steve
What does the Cumulus main screen show? How are you actually getting those figures onto your web site (i.e. what does the code look like before Cumulus has processed it?).

If I configure Cumulus with your location, this is what I get in Cumulus and on the standard web page. They look correct to me (and the times are not the same as the ones on your web site).
2016-02-18 08_07_45.png
2016-02-18 08_09_06.png

Re: Question about Sunrise & Sunset times

Posted: Thu 18 Feb 2016 9:24 am
by RayProudfoot
Hi Steve,

Problem solved. I mistakenly thought Cumulus was still calculating day length and daylight but it was the php script from John that was doing it.

There was a small error in his calculations but he has provided a corrected php overnight which I've applied. I agree there are differences in some times and I'll take that up with John.

Re: Question about Sunrise & Sunset times

Posted: Thu 18 Feb 2016 10:33 am
by steve
RayProudfoot wrote:I agree there are differences in some times and I'll take that up with John.
There are always going to be slight differences depending on the calculation method. His times may be just as valid as the Cumulus ones.

Re: Question about Sunrise & Sunset times

Posted: Thu 18 Feb 2016 10:53 am
by RayProudfoot
John has now supplied me with another indexT.htm which reverts to using Cumulus tags for everything and only Local Noon is now calculated by php.

There is a 1 minute discrepancy in that but rounding is probably a factor.