Page MenuHomeFeedback Tracker

Discontinuous moon (light) intensity and phase
New, NormalPublic

Description

The command (or rather function) moonIntensity is discontinuous, which is clearly a bug. The reason is most like the command (or again function) moonPhase which is also discontinuous, since it only gets updated on a new day (i.e. hours, minutes and seconds are ignored) and as such moonPhase is a step-function. I suspect that moonIntensity uses moonPhase as an input, hence the discontinuinity at the jump to a new day.

Fix/suggestion: a call to moonPhase should recalculate/update the moonPhase taking hours, minutes and seconds into account. I.e. no need to internally keep it updated/continuous for no reason, but if we request this, please, calculate it again. I think moonIntensity should be indirectly fixed this way.
And if this doesn't sound like a good idea, at least work with an uptodate/more exact moonPhase value for calls to moonIntensity.

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Steps To Reproduce

Observe moonPhase and moonIntensity at some interval (skipTime). Take a closer look when the day changes.

Additional Information

Example: from 2026-08-13 to 2026-08-14 we have:

# id, date, daytime, moon phase, moon intensity
0, [2026,8,13,0,0], 0.00173806, 0.54626, 0
1, [2026,8,13,0,12], 0.201761, 0.54626, 0
...
117, [2026,8,13,23,24], 23.407, 0.54626, 0.666703
118, [2026,8,13,23,36], 23.607, 0.54626, 0.666641
119, [2026,8,13,23,48], 23.8071, 0.54626, 0.586754
120, [2026,8,14,0,0], 0.00716803, 0.613997, 0.250798

This is a jump from 0.59 to 0.25 within 12 minutes (I took 5 samples per h). This is at midnight, sunrise is at 5.4, sunset at 18.6, so there shouldn't be such a drastic change losing more than half of the light intensity. Go ingame. Take a look. It's as bright (or dark) as 10 minutes ago.

Sure, at other days this jump is nicely hidden/not as pronounced. But as this example illustrates, moonIntensity is unreliable/broken (as in: we're probably better off not using moonIntensity and compute something based on moonPhase, sunrise and sunset on our own that is continuous... doesn't sound like much fun, honestly.).

Event Timeline

ruebe created this task.Mar 10 2018, 3:03 AM