<div dir="ltr">I worked on this and came up with a solution I like, that I've put in MR 263<br><div><a href="https://invent.kde.org/education/kstars/-/merge_requests/263">https://invent.kde.org/education/kstars/-/merge_requests/263</a><br></div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Check it out, and let me know what you think.</div><div>Hy</div><div><br></div><div>PS That new feature to append scheduler jobs came in handy. Hadn't used it before. Eric--Thanks for that!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 25, 2021 at 1:31 AM Eric Dejouhanet <<a href="mailto:eric.dejouhanet@gmail.com">eric.dejouhanet@gmail.com</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"><div style="background-color:rgb(255,255,255);background-image:initial;line-height:initial"><div id="gmail-m_5231653695536556293response_container_BBPPID" style="outline:none" dir="auto"> <div name="BB10" id="gmail-m_5231653695536556293BB10_response_div_BBPPID" dir="auto" style="width:100%"> There are several ways to improve AH:</div><div name="BB10" id="gmail-m_5231653695536556293BB10_response_div_BBPPID" dir="auto" style="width:100%"><br></div><div name="BB10" id="gmail-m_5231653695536556293BB10_response_div_BBPPID" dir="auto" style="width:100%">- import/export mechanisms, instead of asking the end-user to work with sql.</div><div name="BB10" id="gmail-m_5231653695536556293BB10_response_div_BBPPID" dir="auto" style="width:100%">- 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. </div><div name="BB10" id="gmail-m_5231653695536556293BB10_response_div_BBPPID" dir="auto" style="width:100%">- proper inside/outside rendering of regions, as you noticed. </div><div name="BB10" id="gmail-m_5231653695536556293BB10_response_div_BBPPID" dir="auto" style="width:100%">- automatic generation of horizon by making a tool count stars on frames taken at grid coordinates. </div><div name="BB10" id="gmail-m_5231653695536556293BB10_response_div_BBPPID" dir="auto" style="width:100%">- having obstructed regions in the sky instead of horizon obstruction,as you mentioned. </div><div name="BB10" id="gmail-m_5231653695536556293BB10_response_div_BBPPID" dir="auto" style="width:100%">- 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. </div> <div id="gmail-m_5231653695536556293blackberry_signature_BBPPID" name="BB10" dir="auto"> <div id="gmail-m_5231653695536556293_signaturePlaceholder_BBPPID" name="BB10" dir="auto"><p dir="ltr"><a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a> - <a href="https://astronomy.dejouha.net" target="_blank">https://astronomy.dejouha.net</a></p></div> </div></div><div id="gmail-m_5231653695536556293_original_msg_header_BBPPID" dir="auto"> <table width="100%" style="border-spacing:0px;display:table;outline:none"><tbody><tr><td colspan="2" style="padding:initial;font-size:initial;text-align:initial"> <div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in;font-family:Tahoma,"BB Alpha Sans","Slate Pro";font-size:10pt"> <div id="gmail-m_5231653695536556293from"><b>De:</b> <a href="mailto:murveit@gmail.com" target="_blank">murveit@gmail.com</a></div><div id="gmail-m_5231653695536556293sent"><b>Envoyé:</b> 25 mars 2021 07:23</div><div id="gmail-m_5231653695536556293to"><b>À:</b> <a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a></div><div id="gmail-m_5231653695536556293reply_to"><b>Répondre à:</b> <a href="mailto:hy@murveit.com" target="_blank">hy@murveit.com</a></div><div id="gmail-m_5231653695536556293cc"><b>Cc:</b> <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></div><div id="gmail-m_5231653695536556293subject"><b>Objet:</b> Re: Artificial Horizon</div></div></td></tr></tbody></table> <br> </div><div name="BB10" dir="auto" style="background-image:initial;line-height:initial;outline:none"><div dir="ltr">Sorry, don't understand your last line--What is #7?<div><br></div><div>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).</div><div><br></div><div>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". </div><div><br></div><div>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. </div><div><br></div><div>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. </div><div><br></div><div>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.</div><div><br></div><div>Hy</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">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></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="background-color:rgb(255,255,255)"><div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453response_container_BBPPID" style="outline:none" dir="auto"> <div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453BB10_response_div_BBPPID" dir="auto" style="width:100%"> 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. </div> <div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453blackberry_signature_BBPPID" dir="auto"> <div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453_signaturePlaceholder_BBPPID" dir="auto"><p dir="ltr"><a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a> - <a href="https://astronomy.dejouha.net" target="_blank">https://astronomy.dejouha.net</a></p></div> </div></div><div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453_original_msg_header_BBPPID" dir="auto"> <table width="100%" style="border-spacing:0px;display:table;outline:none"><tbody><tr><td colspan="2"> <div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in;font-family:tahoma,"bb alpha sans","slate pro";font-size:10pt"> <div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453from"><b>De:</b> <a href="mailto:murveit@gmail.com" target="_blank">murveit@gmail.com</a></div><div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453sent"><b>Envoyé:</b> 24 mars 2021 22:50</div><div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453to"><b>À:</b> <a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a></div><div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453reply_to"><b>Répondre à:</b> <a href="mailto:hy@murveit.com" target="_blank">hy@murveit.com</a></div><div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453cc"><b>Cc:</b> <a href="mailto:kstars-devel@kde.org" target="_blank">kstars-devel@kde.org</a></div><div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453subject"><b>Objet:</b> Re: Artificial Horizon</div></div></td></tr></tbody></table> <br> </div><div dir="auto" style="outline:none"><div dir="ltr">Thanks. I'll take a look at rendering, or perhaps add an "invert" option, if I can't improve the logic.<div>Does anything outside of the skymap use the artificial horizon?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">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></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453gmail-m_311724080350612688response_container_BBPPID" style="outline:none" dir="auto"> 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. </div><div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453gmail-m_311724080350612688response_container_BBPPID" style="outline:none" dir="auto"><br></div><div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453gmail-m_311724080350612688response_container_BBPPID" style="outline:none" dir="auto">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> <div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453gmail-m_311724080350612688blackberry_signature_BBPPID" dir="auto"> <div id="gmail-m_5231653695536556293gmail-m_-7257826664635952453gmail-m_311724080350612688_signaturePlaceholder_BBPPID" dir="auto"><p dir="ltr"><a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a> - <a href="https://astronomy.dejouha.net" target="_blank">https://astronomy.dejouha.net</a></p></div> </div></div></div></blockquote></div>
</div></div></blockquote></div>
</div></div></blockquote></div>