Quantcast

How to display sunrise/sunset times on the NAC/SHAC?

FAQ000240171

01 August 2022

How to display sunrise/sunset times on NAC/SHAC system

userparameter

Create sunrise and sunset userparameter
 

userparameter2

Object will display the actual value

Object will display the actual value
 

Resident Script

Script

Visualization page

Add parameter sunrise/sunset in Visualization

Add parameter sunrise/sunset in Visualization

Display

Display1

Display

 

:Note: make sure your regional settings are correct and for specific times to add Latt and Long settings??

Sunset/Sunrise requires change the latitude and longitude,

 

– eg  Adelaide latitude and longitude

latitude = -34.929

longitude = 138.601

 

sunrise, sunset = rscalc(latitude, longitude)

 

--  sunset and sunrise  variable

sunrise = string.format('%d:%.2d', math.floor(sunrise / 60), sunrise % 60)

sunset = string.format('%d:%.2d', math.floor(sunset / 60), sunset % 60)