<div dir="ltr">Eric, Wolfgang, et al,<div><br></div><div>I fully support your efforts to add testing to KStars. To that end, I have done a few things related to my MR <a href="https://invent.kde.org/education/kstars/-/merge_requests/263">https://invent.kde.org/education/kstars/-/merge_requests/263</a></div><div><br></div><div>1) I added a full UI test to the MR. Check it out! It's my first UI test, and as far as I can tell, the first one that's not Ekos related. Of course, let me know if there's some way to improve the test.</div><div><br></div><div>2) I removed the scheduler changes from the Artificial Horizon MR. The AH feature and the Scheduler are two separate things, and combining them in this MR will only delay the artificial horizon code unnecessarily, and make the changes less modular etc.</div><div><br></div><div>I believe that my artificial horizon MR is ready for integration (pending review).</div><div><br></div><div>I hope to soon propose minimal changes to the scheduler to take advantage of the Artificial Horizon feature, similar to what I showed up above. I agree that any such changes need to be supported by testing, and I will look into ways to do that. Of course, I don't want to step on any toes, or mess up any scheduler work you two have planned. It's my hope that computing job schedules could be Unit Tested, as opposed to UI Tested, and avoid some of the thorny issues in the scheduler related to starting and stopping of jobs. In any event, stay tuned, and I'll let you know my future proposals when they're more clear to me. If they interfere with your ideas, just let me know.</div><div><br></div><div>Hy</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 1, 2021 at 9:19 AM Wolfgang Reissenberger <<a href="mailto:sterne-jaeger@openfuture.de">sterne-jaeger@openfuture.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Hy and Eric,<br>
I fully agree with you, Eric, we should be very reluctant in changing the Scheduler, even in the best intention introducing a killer feature. It will take us a while to fix the regressions.<br>
<br>
I would really appreciate if Eric and I find support in creating a good test bed and making the Scheduler more modular as it currently is. We have plenty of ideas what could be done, but availability is an issue…<br>
<br>
I took a glimpse what you, Hy, changed, and it looks really good and modular. So, contradicting what I just said above, why not. But please let us keep the line that we do not change anything without an appropriate test bed.<br>
<br>
Wolfgang<br>
p.s.: and yes, the behavior of handling limits is annoying. I would really appreciate if these limits lead to a „fall through“ rather than delaying everything below. But that’s quite a journey...<br>
<br>
> Am 01.04.2021 um 09:42 schrieb Eric Dejouhanet <<a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a>>:<br>
> <br>
> Hello Hy, <br>
> <br>
> This behaviour is the expected one: a job that goes through its altitude restriction will be rescheduled instead of being aborted.<br>
> <br>
> I completely utterly totally agree that this has to be improved to fit other jobs in the current night session. But. <br>
> <br>
> The original design was preserving the order of the jobs so that the order of the plan created by the end-user would be followed strictly.<br>
> <br>
> From there, an automatic reordering of jobs based on altitude was (re-)attached as a persistent option and as a helper in the UI. Still once the Scheduler started, we wouldn't change a comma. <br>
> <br>
> From there, it was observed that a plan required consistent statistics about the duration of each step, and (a lot of) fault tolerance and robustness improvements. We worked on this quite a bit. <br>
> <br>
> From there, Wolfgang proposed three super management schemes for failing jobs to mitigate runtime. The concept of a failing job was discussed at that time, and a job going through its altitude restriction was not considered a failure. <br>
> <br>
> From there, it was obvious that it was not possible to further change the Scheduler leviathan without introducing regressions to existing features, and that a full test coverage was required. Testing the Scheduler required testing all other modules first. And we did that. <br>
> <br>
> So today we're here: we have tests for most modules, but not yet for all Scheduler features. Those tests are not stable enough (I'm taking care of this), but we are in a far better situation than before. We absolutely require Scheduler tests before we introduce new features, and I will probably vote against any change that is not covered and tested.<br>
> <br>
> As a side note, I am really impressed by the work we did on this part, so I would like to once again congratulate everyone that took part in it. <br>
> <br>
> <a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a> - <a href="https://astronomy.dejouha.net" rel="noreferrer" target="_blank">https://astronomy.dejouha.net</a><br>
> <br>
> <br>
> <br>
> Message original <br>
> <br>
> <br>
> De: <a href="mailto:murveit@gmail.com" target="_blank">murveit@gmail.com</a><br>
> Envoyé: 1 avril 2021 08:45<br>
> À: <a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a><br>
> Répondre à: <a href="mailto:hy@murveit.com" target="_blank">hy@murveit.com</a><br>
> Cc: <a href="mailto:hy@murveit.com" target="_blank">hy@murveit.com</a>; <a href="mailto:kstars-devel@kde.org" target="_blank">kstars-devel@kde.org</a><br>
> Objet: Re: Artificial Horizon<br>
> <br>
> <br>
> I guess in tonight's testing one thing worked and the other didn't go as I'd hoped.<br>
> The first job ran until it hit the artificial horizon constraint on its way west/down and got rescheduled for the next day. Good!<br>
> The 2nd job could have started up in an hour or two after the first job was stopped. However, the scheduler scheduled it for the next night instead of in a couple hours. I stopped the scheduler, removed the first job, restarted the scheduler, and then the scheduler did the right thing (scheduling it for when it would be above the artificial horizon tonight).<br>
> Bottom line, the scheduler is respecting the artificial horizon constraints, but its logic doesn't allow the 2nd job to run for some reason.<br>
> <br>
> <br>
> Is there a known complication, why the scheduler wouldn't schedule a 2nd job if the first job got suspended because of altitude?<br>
> <br>
> <br>
> I'll look at the code, but just in case this is a well known complication, here are some log snippets. It's running HEAD plus my MR.<br>
> <br>
> <br>
> Hy<br>
> <br>
> <br>
> <br>
> <br>
> Original schedule:<br>
> M1 starting at 31/03 21:47, completing at 01/04 07:44." (it thinks the first job will take 10 hours--doesn't take altitude into account)<br>
> M5 starting at 02/04 00:37, completing at 02/04 08:23." (though it could start around 0:30 on 01/04, it starts the next night because of the first job.<br>
> <br>
> [2021-03-31T21:49:46.835 PDT INFO ][ org.kde.kstars.ekos.scheduler] - Scheduler is starting...<br>
> [2021-03-31T21:49:46.837 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Scheduler started."<br>
> [2021-03-31T21:49:46.844 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - Scheduler started.<br>
> [2021-03-31T21:49:47.904 PDT INFO ][ org.kde.kstars.ekos.scheduler] - Option to sort jobs based on priority and altitude is false<br>
> [2021-03-31T21:49:47.910 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Schedule attempt #1 for 35865-second job 'm1' on row #1 starting at 31/03 21:47, completing at 01/04 07:44."<br>
> [2021-03-31T21:49:47.910 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Warning: job 'm1' execution overlaps daylight, it will be interrupted at dawn and rescheduled on next night time."<br>
> [2021-03-31T21:49:47.916 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' dark sky score is +0 at 31/03 21:49"<br>
> [2021-03-31T21:49:47.917 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' altitude score is +13 at 31/03 21:49"<br>
> [2021-03-31T21:49:47.920 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' Moon separation score is +20 at 31/03 21:49"<br>
> [2021-03-31T21:49:47.921 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' has a total score of +33 at 31/03 21:49."<br>
> [2021-03-31T21:49:47.930 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' on row #1 passed all checks after 1 attempts, will proceed at 31/03 21:47 for approximately 35865 seconds, marking scheduled"<br>
> [2021-03-31T21:49:47.930 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Schedule attempt #1 for 27945-second job 'M5' on row #2 starting at 02/04 00:37, completing at 02/04 08:23."<br>
> [2021-03-31T21:49:47.934 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' dark sky score is +0 at 31/03 21:49"<br>
> [2021-03-31T21:49:47.935 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' altitude score is -1000 at 31/03 21:49"<br>
> [2021-03-31T21:49:47.935 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' has a total score of -1000 at 31/03 21:49."<br>
> [2021-03-31T21:49:47.941 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' on row #2 passed all checks after 1 attempts, will proceed at 02/04 00:37 for approximately 27945 seconds, marking scheduled"<br>
> [2021-03-31T21:49:47.941 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' dark sky score is +0 at 31/03 21:49"<br>
> [2021-03-31T21:49:47.943 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' altitude score is +13 at 31/03 21:49"<br>
> [2021-03-31T21:49:47.944 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' Moon separation score is +20 at 31/03 21:49"<br>
> [2021-03-31T21:49:47.944 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' has a total score of +33 at 31/03 21:49."<br>
> [2021-03-31T21:49:47.949 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' is selected for next observation with priority #10 and score 33."<br>
> [2021-03-31T21:49:48.848 PDT INFO ][ org.kde.kstars.ekos.scheduler] - Ekos communication status is 0 Starting Ekos...<br>
> <br>
> The first job gets interrupted (properly), but the 2nd job still is scheduled for the next day.<br>
> [2021-03-31T23:03:36.714 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' current altitude (25.11 degrees) crossed minimum constraint altitude (0.00 degrees), marking idle."<br>
> <br>
> [2021-03-31T23:03:36.721 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - Job ' "m1" ' is stopping current action... 13<br>
> [2021-03-31T23:03:36.723 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' is stopping guiding..."<br>
> [2021-03-31T23:03:36.777 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - Find next job...<br>
> [2021-03-31T23:03:37.878 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Blue requires a dither procedure."<br>
> [2021-03-31T23:03:37.878 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Red requires a dither procedure."<br>
> [2021-03-31T23:03:37.879 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Green requires a dither procedure."<br>
> [2021-03-31T23:03:37.879 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 8x240\" Ha requires a dither procedure."<br>
> [2021-03-31T23:03:37.879 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Blue requires a dither procedure."<br>
> [2021-03-31T23:03:37.880 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Red requires a dither procedure."<br>
> [2021-03-31T23:03:37.880 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Green requires a dither procedure."<br>
> [2021-03-31T23:03:37.880 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 8x240\" Ha requires a dither procedure."<br>
> [2021-03-31T23:03:37.880 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Blue requires a dither procedure."<br>
> [2021-03-31T23:03:37.881 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Red requires a dither procedure."<br>
> [2021-03-31T23:03:37.881 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Green requires a dither procedure."<br>
> [2021-03-31T23:03:37.881 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 8x240\" Ha requires a dither procedure."<br>
> [2021-03-31T23:03:37.881 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Red requires a dither procedure."<br>
> [2021-03-31T23:03:37.881 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Blue requires a dither procedure."<br>
> [2021-03-31T23:03:37.882 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Green requires a dither procedure."<br>
> [2021-03-31T23:03:37.882 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 8x240\" Ha requires a dither procedure."<br>
> [2021-03-31T23:03:37.883 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Red requires a dither procedure."<br>
> [2021-03-31T23:03:37.883 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Green requires a dither procedure."<br>
> [2021-03-31T23:03:37.883 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' 15x120\" Blue requires a dither procedure."<br>
> [2021-03-31T23:03:37.888 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' estimated to take 09h 57m 45s to complete."<br>
> [2021-03-31T23:03:37.892 PDT INFO ][ org.kde.kstars.ekos.scheduler] - Option to sort jobs based on priority and altitude is false<br>
> [2021-03-31T23:03:37.898 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Schedule attempt #1 for 35865-second job 'm1' on row #1 starting at 31/03 23:03, completing at 01/04 09:01."<br>
> [2021-03-31T23:03:37.898 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Warning: job 'm1' execution overlaps daylight, it will be interrupted at dawn and rescheduled on next night time."<br>
> [2021-03-31T23:03:38.025 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' is scheduled to start at 01/04 12:50, in compliance with altitude and Moon separation requirements."<br>
> [2021-03-31T23:03:38.025 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Schedule attempt #2 for 35865-second job 'm1' on row #1 starting at 01/04 12:50, completing at 01/04 22:48."<br>
> [2021-03-31T23:03:38.028 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' is scheduled to start at 01/04 21:00, in compliance with night time requirement."<br>
> [2021-03-31T23:03:38.029 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Schedule attempt #3 for 35865-second job 'm1' on row #1 starting at 01/04 21:00, completing at 02/04 06:57."<br>
> [2021-03-31T23:03:38.030 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Warning: job 'm1' execution overlaps daylight, it will be interrupted at dawn and rescheduled on next night time."<br>
> [2021-03-31T23:03:38.032 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' dark sky score is +0 at 31/03 23:03"<br>
> [2021-03-31T23:03:38.034 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' altitude score is -1000 at 31/03 23:03"<br>
> [2021-03-31T23:03:38.035 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' has a total score of -1000 at 31/03 23:03."<br>
> [2021-03-31T23:03:38.042 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' on row #1 passed all checks after 3 attempts, will proceed at 01/04 21:00 for approximately 35865 seconds, marking scheduled"<br>
> [2021-03-31T23:03:38.042 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Schedule attempt #1 for 27945-second job 'M5' on row #2 starting at 02/04 00:37, completing at 02/04 08:23."<br>
> [2021-03-31T23:03:38.045 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' is scheduled to start at 02/04 07:02, 300 seconds after 02/04 06:57, in compliance with previous job completion requirement."<br>
> [2021-03-31T23:03:38.045 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Schedule attempt #2 for 27945-second job 'M5' on row #2 starting at 02/04 07:02, completing at 02/04 14:48."<br>
> [2021-03-31T23:03:38.050 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' is scheduled to start at 02/04 21:00, in compliance with night time requirement."<br>
> [2021-03-31T23:03:38.050 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Schedule attempt #3 for 27945-second job 'M5' on row #2 starting at 02/04 21:00, completing at 03/04 04:45."<br>
> [2021-03-31T23:03:38.086 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' is scheduled to start at 03/04 00:33, in compliance with altitude and Moon separation requirements."<br>
> [2021-03-31T23:03:38.086 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Schedule attempt #4 for 27945-second job 'M5' on row #2 starting at 03/04 00:33, completing at 03/04 08:19."<br>
> [2021-03-31T23:03:38.089 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' dark sky score is +0 at 31/03 23:03"<br>
> [2021-03-31T23:03:38.089 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' altitude score is -1000 at 31/03 23:03"<br>
> [2021-03-31T23:03:38.089 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' has a total score of -1000 at 31/03 23:03."<br>
> [2021-03-31T23:03:38.092 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' on row #2 passed all checks after 4 attempts, will proceed at 03/04 00:33 for approximately 27945 seconds, marking scheduled"<br>
> [2021-03-31T23:03:38.092 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' dark sky score is +0 at 31/03 23:03"<br>
> [2021-03-31T23:03:38.093 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' altitude score is -1000 at 31/03 23:03"<br>
> [2021-03-31T23:03:38.093 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' has a total score of -1000 at 31/03 23:03."<br>
> [2021-03-31T23:03:38.093 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' is selected for next observation with priority #10 and score -1000."<br>
> [2021-03-31T23:03:38.865 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'm1' scheduled for execution at 01/04 21:00. Observatory scheduled for shutdown until next job is ready."<br>
> <br>
> To see if there some other issue, I removed job M1 and just tried to schedule M5. It works fine (scheduling for tonight after rising above the artificial horizon obstruction).<br>
> <br>
> M5 starting at 01/04 00:42, completing at 01/04 08:28."<br>
> <br>
> [2021-03-31T23:10:05.095 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Scheduler started."<br>
> [2021-03-31T23:10:05.102 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - Scheduler started.<br>
> [2021-03-31T23:10:06.196 PDT INFO ][ org.kde.kstars.ekos.scheduler] - Option to sort jobs based on priority and altitude is false<br>
> [2021-03-31T23:10:06.199 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Schedule attempt #1 for 27945-second job 'M5' on row #1 starting at 01/04 00:42, completing at 01/04 08:28."<br>
> [2021-03-31T23:10:06.200 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' dark sky score is +0 at 31/03 23:10"<br>
> [2021-03-31T23:10:06.201 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' altitude score is -1000 at 31/03 23:10"<br>
> [2021-03-31T23:10:06.201 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' has a total score of -1000 at 31/03 23:10."<br>
> [2021-03-31T23:10:06.211 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' on row #1 passed all checks after 1 attempts, will proceed at 01/04 00:42 for approximately 27945 seconds, marking scheduled"<br>
> [2021-03-31T23:10:06.212 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' dark sky score is +0 at 31/03 23:10"<br>
> [2021-03-31T23:10:06.212 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' altitude score is -1000 at 31/03 23:10"<br>
> [2021-03-31T23:10:06.212 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' has a total score of -1000 at 31/03 23:10."<br>
> [2021-03-31T23:10:06.213 PDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Job 'M5' is selected for next observation with priority #10 and score -1000."<br>
> [2021-03-31T23:10:07.213 PDT INFO ][ org.kde.kstars.ekos.scheduler] - "Sleeping until observation job M5 is ready at Thu Apr 1 00:42:41 2021..."<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> On Wed, Mar 31, 2021 at 10:07 PM Hy Murveit <<a href="mailto:murveit@gmail.com" target="_blank">murveit@gmail.com</a>> wrote:<br>
> <br>
> I worked on this and came up with a solution I like, that I've put in MR 263<br>
> <br>
> <a href="https://invent.kde.org/education/kstars/-/merge_requests/263" rel="noreferrer" target="_blank">https://invent.kde.org/education/kstars/-/merge_requests/263</a><br>
> <br>
> <br>
> <br>
> The scheduler integration was straightforward...basically this is the same as the min-altitude constraints that already work fine. It's just that the scheduler needs to pass the azimuth it's considering as well into a method I created that computes the altitude constraint for the given azimuth.<br>
> <br>
> <br>
> I modified the Artificial Horizon UI and feature (with Jasem's blessing). It now does not represent polygons at all, but rather a sequence of points defining line segments in azimuth/altitude coordinates (above it in altitude is clear, below is obstructed). If there are multiple lines, use the highest. Entering the points for the line segments is easy...you can enter the points by clicking on the skymap--easy, that is, if you've also created a terrain backgound for your location (my previous MR) so that it's obvious where the obstructions are.<br>
> <br>
> <br>
> I'd like to add some unit testing, but other than that, seems to work. Testing tonight with my telescope -- gave it some targets with the obstruction issues, and the scheduler seems to be figuring things out.<br>
> <br>
> <br>
> Check it out, and let me know what you think.<br>
> Hy<br>
> <br>
> <br>
> PS That new feature to append scheduler jobs came in handy. Hadn't used it before. Eric--Thanks for that!<br>
> <br>
> <br>
> On Thu, Mar 25, 2021 at 1:31 AM Eric Dejouhanet <<a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a>> wrote:<br>
> <br>
> There are several ways to improve AH:<br>
> <br>
> <br>
> - import/export mechanisms, instead of asking the end-user to work with sql.<br>
> - edit mode :) the safest way to edit AH is currently entering coordinates by hand instead of clicking. This is mostly similar to creating an horizon in the eqmod driver, except the end point must be the same as the beginning point. <br>
> - proper inside/outside rendering of regions, as you noticed. <br>
> - automatic generation of horizon by making a tool count stars on frames taken at grid coordinates. <br>
> - having obstructed regions in the sky instead of horizon obstruction,as you mentioned. <br>
> - obstruction restrictions for the Scheduler, which conflicts with the current design of the plan: observations are currently expected to be able to start at some time of one standard day and to have to finish at some time during that day, after which those tasks either complete or abort. No provision for tasks that may be able to start, stop then restart at some other time before other tasks have even started. This requires a more dynamic scheduling, whose first step is to allow user modification of the plan while Scheduler is running. <br>
> <br>
> <a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a> - <a href="https://astronomy.dejouha.net" rel="noreferrer" target="_blank">https://astronomy.dejouha.net</a><br>
> <br>
> De: <a href="mailto:murveit@gmail.com" target="_blank">murveit@gmail.com</a><br>
> Envoyé: 25 mars 2021 07:23<br>
> À: <a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a><br>
> Répondre à: <a href="mailto:hy@murveit.com" target="_blank">hy@murveit.com</a><br>
> Cc: <a href="mailto:hy@murveit.com" target="_blank">hy@murveit.com</a>; <a href="mailto:kstars-devel@kde.org" target="_blank">kstars-devel@kde.org</a><br>
> Objet: Re: Artificial Horizon<br>
> <br>
> <br>
> Sorry, don't understand your last line--What is #7?<br>
> <br>
> <br>
> Also, why would people make scripts when nothing makes use of it? Do users find enough added value just marking up the sky? (I'm new to this and don't really understand it's current value--happy to be educated. I'm really just using my imaging point-of-view).<br>
> <br>
> <br>
> FWIW, I played with it this evening, and found editing regions buggy. For instance, if you define two regions, and then delete one of them, the one you didn't delete loses its last point and becomes "not closed". <br>
> <br>
> <br>
> When defining the polygons, it's necessary to be very exact when clicking the last point (it needs to exactly match the first one). I'd like to be simpler--e.g. the system could easily close the polygon itself. <br>
> <br>
> <br>
> Don't think we shoudl constrain the polygons to start (and end) on the horizon--the instructions say one needs to do this. For instance, my telescope's "horizon" never touches the real horizon at any azimuth. <br>
> <br>
> <br>
> The UI, though, with the addition of Terrain makes it straight-forward to define a horizon. If the buggy-ness, and the issues with what's inside the polygon and what's outside it were resolved, this could be a reasonable thing to integrate with the scheduler.<br>
> <br>
> <br>
> Hy<br>
> <br>
> <br>
> <br>
> <br>
> On Wed, Mar 24, 2021 at 11:00 PM Eric Dejouhanet <<a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a>> wrote:<br>
> <br>
> I don't think any other feature is using AH. It is slightly tedious to create and to edit. Some forum users created database scripts to generate it. #7 is registered in gitlab to make use of it in Scheduler. <br>
> <br>
> <a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a> - <a href="https://astronomy.dejouha.net" rel="noreferrer" target="_blank">https://astronomy.dejouha.net</a><br>
> <br>
> De: <a href="mailto:murveit@gmail.com" target="_blank">murveit@gmail.com</a><br>
> Envoyé: 24 mars 2021 22:50<br>
> À: <a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a><br>
> Répondre à: <a href="mailto:hy@murveit.com" target="_blank">hy@murveit.com</a><br>
> Cc: <a href="mailto:kstars-devel@kde.org" target="_blank">kstars-devel@kde.org</a><br>
> Objet: Re: Artificial Horizon<br>
> <br>
> <br>
> Thanks. I'll take a look at rendering, or perhaps add an "invert" option, if I can't improve the logic.<br>
> Does anything outside of the skymap use the artificial horizon?<br>
> <br>
> <br>
> On Wed, Mar 24, 2021 at 2:39 PM Eric Dejouhanet <<a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a>> wrote:<br>
> <br>
> 1. For various reasons, your horizon may be rendered "from the outside". That's why you don't want to do a single 360 polygon. <br>
> <br>
> <br>
> 5. Scheduler does not make use of AH. It's been in my pipe for some time, but it's trickier than it seems. The first step would be to have two altitude restrictions, one for setting objects (the current one we have) and one for rising objects. <br>
> <br>
> <br>
> <a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a> - <a href="https://astronomy.dejouha.net" rel="noreferrer" target="_blank">https://astronomy.dejouha.net</a><br>
<br>
</blockquote></div>