Hi 

I am running an AllSkyCam and have set up a very basic profile with just a camera (and a mount simulator) in order to capture a sequence of wide angle shots throughout every night.  In order to prevent daytime shots, I have set up a schedule that will repeat forever with twilight constraints and have tuned the offsets for dusk and dawn.  Previously I was hit with an issue that prevented kstars from running through the night (audio notifications causing file descriptor limits to be breached).  Now that is identified and eliminated, I have found the scheduler would not stop due to twilight constraints being passed at dawn.

In short I tracked down and changed this line of code in ekos/scheduler/scheduler.cpp: 

line 3718

if (currentJob->getEnforceTwilight() && ((Dawn < Dusk && preDawnDateTime < now) || (Dusk < Dawn)))

to the prior (simpler) version which was changed on 7th July 2021.
if (currentJob->getEnforceTwilight() && now > KStarsDateTime(preDawnDateTime))

The commit is detailed here .

This fixes the issue for me after some testing with large offsets to bring dawn closer - I'll post again if it does not work for me when running under normal operation.  I also added some logging showing the values of the variables involved in the prior check.  Does the function KStarsDateTime(preDawnDateTime) perform an important role in the logical check perhaps?  My log line was:
//    appendLogText(i18n("Dusk=%1, Dawn=%2, preDawnDateTime=%3, now=%4, KStarsDateTime(preDawnDateTime)=%5", //      Dusk.toString(), Dawn.toString(), preDawnDateTime.toString(), now.toString(), KStarsDateTime(preDawnDateTime).toString()));

So I did not inspect the variable preDawnDateTime directly - I'm not set up for C++ development.

Kind Regards
Iain
 

Read More...