Astro Clock with LUA Script

This logic group calculates, in addition to the elevation and azimuth values, the sunrise/sunset time and day/night

Based on the logic group "Position of the Sun" (by Gero Jöbstl), the logic group was extended by the outputs sunrise and sunset time and sunrise-sunset (night).

"in1" (gate) of the Lua script is an enable object that follows the usual logic editor system. I.e. with EMPTY (nil) or TRUE at "in1" the astroclock is active, with FALSE the script does not send to the outputs.
"in2", the timer input analogue to the output script.
At "in3" the twilight value can be determined. In the example, the civil twilight at -0.833 ° is specified in the left group.
In addition, a second group (astro clock nautical night), without the outputs for "Elevation calculated" and "Azimuth calculated", which outputs the sunrise and sunset times at nautical night (-6×60).

The five outputs are self-explanatory. Output 1 (out 1) and output 2 (out 2) are elevation and azimuth.
Output 3 (out 3) and 4 (out 4) provide the calculated time for sunrise and sunset times (as a string).
Output 5 (out 5) supplies a day/night 1-bit value, whereby night is output with "True" and day with "False".

Bernd Müller
(205; 2022.03)

Astro Clock with LUA Script

452
This logic group is compatible with: EP
*With the download you accept the Notes on use for logic groups.