Function Block MOONPHASE

The Function Block MOONPHASE returns the phase of the moon.

Input DT

Defines the time for calculation in DT#. This way, it can be determined which phase the moon has at a certain hour or on another specific date. If the input is not used or the value NULL is applied, the current time is used.

Input PT

Defines the interval for calculating the moon phase. It is recommended to set this value high. If the input is not used or the value NULL is applied, T#1m is assumed.

Upon restart or when changing an input, all outputs are recalculated immediately.

Output Phase

The output indicates the phase of the moon from 0 to 1. The value 0.5 is the full moon and 0 is the new moon. A phase greater than 0.5 is a waning moon. The phase is linear.

Output Age

The output returns the age after the new moon in days.

Output Illumination

The output returns the brightness or coverage from 0 to 1 of the moon.

Output Distance

The output returns the distance in meters from the center of the Earth.

Output Diameter

The output returns the angular diameter in degrees to the Earth.