Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.10.0 (build 3116) - 26 February 2021 (please see announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

Sunrise/set in CumulusUtils

Discussion of the Cumulusutils tool and website generator.

Moderator: HansR

Post Reply
mingjen
Posts: 8
Joined: Wed 21 Dec 2011 3:40 pm
Weather Station: Fine Offset (Rosenborg 68750)
Operating System: Windows 10
Location: Fyn, Denmark
Contact:

Sunrise/set in CumulusUtils

Post by mingjen »

Hi.
I have a problem with sunrise and sunset in CU utils. I think I have got mixed something between my site in Denmark and Spain so that the sunrise/set for Spain are shown in my site for Denmark. If I look at the data in CUtags.php it is the correct data.
Can anyone tell me how the sunrise/set are set in CUMX utils?
https://mingjen.net/odense
Fine offset weather station
CumulusMX

User avatar
HansR
Posts: 1810
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: Sunrise/set in CumulusUtils

Post by HansR »

To be honest, this is quite astonishing and it had been some time since I created the code so I had to take a deep dive, but I think I can explain.

The sun disc is created at startup or refresh of the page.
The sun and moon values (moon is also the same on both sites!) are calculated with the help of the Suncalc library (see About=>license).
The suncalc takes date, latitude and longitude as arguments in a function to get all sun-event times including sunrise and sunset.
Latitude and Longitude are taken from the Cumulus.ini file at compile time.

So in my view, it can only be mixed up if you shared the cumulusutils.js library file between the sites.
Generated files are not interchangeable between sites, they contain site specific data.

Hope this clarifies a bit (and I hope I am right otherwise I don't know at the moment).
Let me know how you get on.
Hans

https://meteo-wagenborgen.nl
Cumulus build 3107 ● Davis Vantage Pro 2+ ● RPi 3B+ ● Raspbian 5.4.79-v7+ ● Mono JIT compiler Debian 5.18.0.240

mingjen
Posts: 8
Joined: Wed 21 Dec 2011 3:40 pm
Weather Station: Fine Offset (Rosenborg 68750)
Operating System: Windows 10
Location: Fyn, Denmark
Contact:

Re: Sunrise/set in CumulusUtils

Post by mingjen »

Thank you. You solwed the problem. 👍 It was the cumulusutils.js. It went wrong when I updated some days ago. I have to keep the two sites seperate😊
https://mingjen.net/odense
Fine offset weather station
CumulusMX

Post Reply