×

INDI Library v1.9.3 Released (11 Nov 2021)

Bimonthly Stable INDI Library release introduces new drivers and fixes for existing ones. Some highlights:

Scheduler not stopping for twilight constraint

  • Posts: 326
  • Thank you received: 24
Hy,

I don't have any issue causing this, in fact it always happens.
The workaround I use is to specify a start time instead of checking twilight.
I assume it must be a setting that is the cause, but what things would have an effect on this that I can provide you with?

Paul
Losmandy G11 with Gemini 2 controller
QSI 583/683 monochrome camera with filter wheel
Starlight Xpress Lodestar X2 guide camera
Microtouch Focuser controlled using Arduino UNO emulating Feathertouch controller
Raspberry Pi 2GB with Raspberry Pi OS 32bit
2 months 2 days ago #76277

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 1
I am getting the same issue, I have updated all software to the latest that I am aware of. Mine is not waiting for Twilight.

Below is a test I was doing for Mosaic. Can be seen that I started with constraint and is running prior to the time. This has been a problem for about 1 to 2 months but I have been applying direct start time instead of Twilight constraint. 

 
Last edit: 2 months 2 days ago by Malcolm Whinfield.
2 months 2 days ago #76279
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 326
  • Thank you received: 24
Hy,

Can I ask at what time of the day you are doing your testing?

Forget what I asked i can see from your screen dump.

I have tested this by adjusting every setting I can find and I have not seen it work.

Paul
Losmandy G11 with Gemini 2 controller
QSI 583/683 monochrome camera with filter wheel
Starlight Xpress Lodestar X2 guide camera
Microtouch Focuser controlled using Arduino UNO emulating Feathertouch controller
Raspberry Pi 2GB with Raspberry Pi OS 32bit
Last edit: 2 months 1 day ago by Paul.
2 months 1 day ago #76341

Please Log in or Create an account to join the conversation.

  • Posts: 728
  • Thank you received: 336
I run my telescope, usually starting at 8pm or so (California time) with the target rising over obstructions around 10pm), but I was testing your issue on the simulator, so I can set any time and any geography. Also, the unit test is free to pick times and geo. 

This is the kind of thing that should be replicatable using the simulator. I suppose there could be some kind of setting that causing this discrepancy. Can you try playing with the simulator, and turning on/off various settings (e.g. altitude limits, artificial horizon limits etc)?

Also, please double check that the constraint is in your scheduler file. In fact, please send me your scheduler file so I can see if for myself. It's easy to make that mistake (e.g. having the twilight restriction checked but not part of your sequence). E.g. double click on your first job in your scheduler sequence, does the twilight restriction check go away?

It would be great to get instructions on how to replicate. I know for you, it's just "start it and it fails". But for me, it works all the time.

Hy
 
Orion Atlas Pro, William Optics ZS105, Moonlight V2 focuser, GSO RC10 w/RSF focuser
ZWO ASI1600, Astronomik Filters, ST80, QHY 5L-IIm guidecam.
KStars/Ekos/Indi on NUC10 & RPi4 w/SSD -- Ubuntu
Projects: Terrain, Polar Align, Analyze, Linear Focuser, SEP MultiStar & GPG Guide, FITS autostretch.
2 months 1 day ago #76342

Please Log in or Create an account to join the conversation.

  • Posts: 326
  • Thank you received: 24
Hy,

I have updated the twilight setting and saved the settings in various states numerous times and will send you the current file after I start up the Raspberry Pi with the configuration.

I have a further question about the code below - how does it know whether the mount or dome are parked when it hasn't connected to the devices?// #4 Check if we're not at dawn - dawn is still next event before dusk, and early dawn is past
if (currentJob->getEnforceTwilight() && ((Dawn < Dusk && preDawnDateTime < now) || (Dusk < Dawn)))
{
// If either mount or dome are not parked, we shutdown if we approach dawn
if (isMountParked() == false || (parkDomeCheck->isEnabled() && isDomeParked() == false))
{
// Minute is a DOUBLE value, do not use i18np
appendLogText(i18n(
"Job '%3' is now approaching astronomical twilight rise limit at %1 (%2 minutes safety margin), marking idle.",
preDawnDateTime.toString(), abs(Options::preDawnTime()), currentJob->getName()));
currentJob->setState(SchedulerJob::JOB_IDLE);
stopCurrentJobAction();
findNextJob();
return;
}
}
Losmandy G11 with Gemini 2 controller
QSI 583/683 monochrome camera with filter wheel
Starlight Xpress Lodestar X2 guide camera
Microtouch Focuser controlled using Arduino UNO emulating Feathertouch controller
Raspberry Pi 2GB with Raspberry Pi OS 32bit
2 months 1 day ago #76343

Please Log in or Create an account to join the conversation.

  • Posts: 728
  • Thank you received: 336
You're referring to this (easier to see with links--this forum seems to mangle code displays):
invent.kde.org/education/kstars/-/blob/m.../scheduler.cpp#L3717

This is inside checkJobStage() which is called every second to check on the active job (when there is an active job).
So, the mount would be connected at that point. This isn't what would run before jobs are started.

When jobs are being evaluated (and are not running) then evaluateJobs is called:
invent.kde.org/education/kstars/-/blob/m.../scheduler.cpp#L1974

so the code you're talking about is more about checking if dawn is approaching and the job should be aborted.

Hy
Orion Atlas Pro, William Optics ZS105, Moonlight V2 focuser, GSO RC10 w/RSF focuser
ZWO ASI1600, Astronomik Filters, ST80, QHY 5L-IIm guidecam.
KStars/Ekos/Indi on NUC10 & RPi4 w/SSD -- Ubuntu
Projects: Terrain, Polar Align, Analyze, Linear Focuser, SEP MultiStar & GPG Guide, FITS autostretch.
2 months 1 day ago #76345

Please Log in or Create an account to join the conversation.

  • Posts: 326
  • Thank you received: 24
Hy,

I have made some progress and have found that the scheduler correctly waits if I set my location to Los Angeles, with the appropriate times zones etc.

I normally have my location set to Maribyrnong but you should try Melbourne, Australia and I believe you will then see the issue.

Paul
Losmandy G11 with Gemini 2 controller
QSI 583/683 monochrome camera with filter wheel
Starlight Xpress Lodestar X2 guide camera
Microtouch Focuser controlled using Arduino UNO emulating Feathertouch controller
Raspberry Pi 2GB with Raspberry Pi OS 32bit
The following user(s) said Thank You: Hy Murveit
2 months 1 day ago #76347

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 1
Very good Paul,

I too changed to Hawaii and tested it worked fine. I also changed to Singapore it worked fine as well. I made sure that both the Raspberry Pi time was changed as well. Seems to only affect Australia. May affect other countries but not tried any more.

As I created my own location data for where I live and my Associations Dark Sky location I made sure I tried Adelaide and Melbourne as they are set in default Ekos settings. Para Hills and Stockport in SA are not and I inputted them as well.
 
2 months 1 day ago #76348

Please Log in or Create an account to join the conversation.

  • Posts: 728
  • Thank you received: 336
Paul,

Thanks very much for find this!

Indeed I was able to replicate that the scheduler started up right away in the afternoon Melbourne time, despite having a twilight restriction.
I will discuss the issue with the kstars developers.

Hy
Orion Atlas Pro, William Optics ZS105, Moonlight V2 focuser, GSO RC10 w/RSF focuser
ZWO ASI1600, Astronomik Filters, ST80, QHY 5L-IIm guidecam.
KStars/Ekos/Indi on NUC10 & RPi4 w/SSD -- Ubuntu
Projects: Terrain, Polar Align, Analyze, Linear Focuser, SEP MultiStar & GPG Guide, FITS autostretch.
2 months 1 day ago #76354

Please Log in or Create an account to join the conversation.

  • Posts: 1011
  • Thank you received: 298
Thanks a lot for spotting this!

Please force the timespec of the midnight date to local time in calculateDawnDusk in the Scheduler. It appears addDays switches it back to UTC.
// Loop dawn and dusk calculation until the events found are the next events
for ( ; dawn <= startup || dusk <= startup ; midnight = midnight.addDays(1))
{
  // Forcefully set midnight to local time, as addDays returns to UTC
  midnight.setTimeSpec(Qt::LocalTime);
 
  // KSAlmanac computes the closest dawn and dusk events from the local sidereal time corresponding to the midnight argument
  KSAlmanac const ksal(midnight, getGeo());
 
  // If dawn is in the past compared to this observation, fetch the next dawn
  if (dawn <= startup)
    dawn = getGeo()->UTtoLT(ksal.getDate().addSecs((ksal.getDawnAstronomicalTwilight() * 24.0 + Options::dawnOffset()) * 3600.0));
 
  // If dusk is in the past compared to this observation, fetch the next dusk
  if (dusk <= startup)
    dusk = getGeo()->UTtoLT(ksal.getDate().addSecs((ksal.getDuskAstronomicalTwilight() * 24.0 + Options::duskOffset()) * 3600.0));
}

That will fix the calculation of the next dusk and avoid the twilight restriction problem.
HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
The following user(s) said Thank You: Hy Murveit
Last edit: 2 months 16 minutes ago by Eric.
2 months 20 minutes ago #76390

Please Log in or Create an account to join the conversation.

  • Posts: 728
  • Thank you received: 336
Thanks for the fix, Eric!
I added your code to my MR, and it's ready for review and submission.
Hy
Orion Atlas Pro, William Optics ZS105, Moonlight V2 focuser, GSO RC10 w/RSF focuser
ZWO ASI1600, Astronomik Filters, ST80, QHY 5L-IIm guidecam.
KStars/Ekos/Indi on NUC10 & RPi4 w/SSD -- Ubuntu
Projects: Terrain, Polar Align, Analyze, Linear Focuser, SEP MultiStar & GPG Guide, FITS autostretch.
The following user(s) said Thank You: Malcolm Whinfield
1 month 4 weeks ago #76392

Please Log in or Create an account to join the conversation.

  • Posts: 728
  • Thank you received: 336
The fix is now submitted into KStars' codebase.
If you built from the latest source, the fix should be there, or whenever a nightly build finishes
using this software (in a day or two) you can get nightly binaries that way.
Orion Atlas Pro, William Optics ZS105, Moonlight V2 focuser, GSO RC10 w/RSF focuser
ZWO ASI1600, Astronomik Filters, ST80, QHY 5L-IIm guidecam.
KStars/Ekos/Indi on NUC10 & RPi4 w/SSD -- Ubuntu
Projects: Terrain, Polar Align, Analyze, Linear Focuser, SEP MultiStar & GPG Guide, FITS autostretch.
1 month 3 weeks ago #76488

Please Log in or Create an account to join the conversation.

Time to create page: 1.151 seconds