<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Makes sense to abort capture and giving the scheduler the opportunity to re-start the sequence. Retrying to calibrate would also be an option, but is a) more complicated and b) I would question whether simply repeating the procedure will lead to a different result.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Am 08.12.2020 um 05:16 schrieb Jasem Mutlaq <<a href="mailto:mutlaqja@ikarustech.com" class="">mutlaqja@ikarustech.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello all,<div class=""><br class=""></div><div class="">Let me explain again what is perhaps going on. The Scheduler can not handle calibration failures UNLESS it is  explicitly performing a guiding step BEFORE Capture starts.</div><div class=""><br class=""></div><div class="">Once capture starts, the scheduler does not check or recognize at all calibration failures. Therefore, IF a calibration failure post meridian flip. This is supposed to abort the capture module, right? So why wasn't capture aborted? If capture is aborted, the scheduler can then handle this. So I think we have to look into that direction.</div><div class=""><br class=""></div><div class="">Note: I'm sending this to <a href="mailto:kstars-devel@kde.org" class="">kstars-devel@kde.org</a>, it's better to use the mailing list to discuss this since everyone subbed to it.</div><div class=""><br clear="all" class=""><div class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">--</div><div class="">Best Regards,<br class="">Jasem Mutlaq<br class=""></div><div class=""><br class=""></div></div></div></div></div></div><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 8, 2020 at 12:56 AM Hy Murveit <<a href="mailto:murveit@gmail.com" class="">murveit@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div class="">Eric et al,</div><div class=""><br class=""></div><div class="">Not clear on how this works, but the code is copied below.</div><div class="">Note the emit newStatus().</div><div class="">What is the state change you are referring to?</div><div class=""><br class=""></div><div class="">FWIW, I've included the code snippet below (pretty complicated code to follow--there's a state machine in guide.cpp -- I guess that's either controlling the internal guider or PHD2), and there's a calibration state machine in internalguider.cpp. From what I can tell, I don't think it's the issue you described, but I'm not too familiar with these state machines, nor the scheduler.</div><div class=""><br class=""></div><div class="">Hy</div><br class=""><div class=""><br class=""></div><div class=""><b class="">From internalguider.cpp, line 505</b><br class="">void InternalGuider::processCalibration()<br class="">{<br class="">    pmath->performProcessing();<br class=""><br class="">    <span style="background-color:rgb(255,255,0)" class="">if (pmath->isStarLost())</span><br class="">    {<br class="">        emit newLog(i18n("Lost track of the guide star. Try increasing the square size or reducing pulse duration."));<br class="">        reset();<br class=""><br class="">        calibrationStage = CAL_ERROR;<br class="">        <span style="background-color:rgb(255,255,0)" class="">emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);</span><br class="">        emit calibrationUpdate(GuideInterface::CALIBRATION_MESSAGE_ONLY, i18n("Calibration Failed: Lost guide star."));<br class="">        return;<br class="">    }<br class=""></div><div class="">    ...</div><div class=""><br class=""></div><div class=""><b class="">From internalguider.cpp, line 542</b><br class=""></div><div class="">void InternalGuider::reset()<br class="">{<br class="">    state = GUIDE_IDLE;<br class="">    //calibrationStage = CAL_IDLE;<br class="">    connect(guideFrame, SIGNAL(trackingStarSelected(int, int)), this, SLOT(trackingStarSelected(int, int)),<br class="">            Qt::UniqueConnection);<br class="">}<br class=""></div><div class=""><br class=""></div><div class=""><b class="">guide.cpp:2381</b></div><div class="">        connect(guider, &Ekos::GuideInterface::newStatus, this, &Ekos::Guide::setStatus);<br class=""></div><div class=""><br class=""></div><div class=""><b class="">guide.cpp:1935</b></div><div class="">void Guide::setStatus(Ekos::GuideState newState)<br class="">{<br class="">    if (newState == state)<br class="">    {<br class="">        // pass through the aborted state<br class="">        if (newState == GUIDE_ABORTED)<br class="">            emit newStatus(state);<br class="">        return;<br class="">    }<br class=""><br class="">    GuideState previousState = state;<br class=""><br class=""><span style="background-color:rgb(255,255,0)" class="">    state = newState;<br class="">    emit newStatus(state);</span><br class=""><br class="">    switch (state)<br class="">    {<br class="">        ...        </div><div class=""><br class="">        case GUIDE_IDLE:<br class="">        case GUIDE_CALIBRATION_ERROR:<br class="">            setBusy(false);<br class="">            manualDitherB->setEnabled(false);<br class="">            break;<br class=""><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 7, 2020 at 12:31 PM Eric Dejouhanet <<a href="mailto:eric.dejouhanet@gmail.com" target="_blank" class="">eric.dejouhanet@gmail.com</a>> wrote:<br class=""></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" class=""><div id="gmail-m_5834904163721927886gmail-m_-3979288803047069353response_container_BBPPID" style="outline:none" dir="auto" class=""> <div name="BB10" id="gmail-m_5834904163721927886gmail-m_-3979288803047069353BB10_response_div_BBPPID" dir="auto" style="width:100%" class=""> Could it be that the emission of the guide failure is done before Guide's state is changed? That was the case for Focus, and Scheduler's immediate reaction for a new autofocus was thus rejected.</div><div name="BB10" id="gmail-m_5834904163721927886gmail-m_-3979288803047069353BB10_response_div_BBPPID" dir="auto" style="width:100%" class=""><br class=""></div><div name="BB10" id="gmail-m_5834904163721927886gmail-m_-3979288803047069353BB10_response_div_BBPPID" dir="auto" style="width:100%" class="">Unfortunately I haven't had time to check the log yet. </div> <div id="gmail-m_5834904163721927886gmail-m_-3979288803047069353blackberry_signature_BBPPID" name="BB10" dir="auto" class="">     <div id="gmail-m_5834904163721927886gmail-m_-3979288803047069353_signaturePlaceholder_BBPPID" name="BB10" dir="auto" class=""><p dir="ltr" class=""><a href="mailto:eric.dejouhanet@gmail.com" target="_blank" class="">eric.dejouhanet@gmail.com</a> - <a href="https://astronomy.dejouha.net/" target="_blank" class="">https://astronomy.dejouha.net</a></p></div> </div></div><div id="gmail-m_5834904163721927886gmail-m_-3979288803047069353_original_msg_header_BBPPID" dir="auto" class="">                                                                                                                                             <table width="100%" style="border-spacing:0px;display:table;outline:none" class=""><tbody class=""><tr class=""><td colspan="2" style="padding:initial;font-size:initial;text-align:initial" class="">                           <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" class="">  <div id="gmail-m_5834904163721927886gmail-m_-3979288803047069353from" class=""><b class="">De:</b> <a href="mailto:murveit@gmail.com" target="_blank" class="">murveit@gmail.com</a></div><div id="gmail-m_5834904163721927886gmail-m_-3979288803047069353sent" class=""><b class="">Envoyé:</b> 7 décembre 2020 21:04</div><div id="gmail-m_5834904163721927886gmail-m_-3979288803047069353to" class=""><b class="">À:</b> <a href="mailto:mutlaqja@ikarustech.com" target="_blank" class="">mutlaqja@ikarustech.com</a></div><div id="gmail-m_5834904163721927886gmail-m_-3979288803047069353reply_to" class=""><b class="">Répondre à:</b> <a href="mailto:hy@murveit.com" target="_blank" class="">hy@murveit.com</a></div><div id="gmail-m_5834904163721927886gmail-m_-3979288803047069353cc" class=""><b class="">Cc:</b> <a href="mailto:hy@murveit.com" target="_blank" class="">hy@murveit.com</a>; <a href="mailto:sterne-jaeger@t-online.de" target="_blank" class="">sterne-jaeger@t-online.de</a>; <a href="mailto:eric.dejouhanet@gmail.com" target="_blank" class="">eric.dejouhanet@gmail.com</a></div><div id="gmail-m_5834904163721927886gmail-m_-3979288803047069353subject" class=""><b class="">Objet:</b> Re: scheduler issue</div></div></td></tr></tbody></table> <br class=""> </div><div name="BB10" dir="auto" style="background-image:initial;line-height:initial;outline:none" class=""><div dir="ltr" class="">It was indeed after a meridian flip.<div class="">Jo also sent the .analyze file to me (attached) and here's a zoom'ed in screen shot from the time of the issue.</div><div class=""><br class=""></div><div class=""><img alt="Screen Shot 2020-12-07 at 12.02.19 PM.png" width="562" height="295" class=""><br class=""></div><div class=""><br class=""></div><div class="">Hy</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 7, 2020 at 11:43 AM Jasem Mutlaq <<a href="mailto:mutlaqja@ikarustech.com" target="_blank" class="">mutlaqja@ikarustech.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div class="">Hello Hy,</div><div class=""><br class=""></div><div class="">Do you know why it was calibrating? this wasn't after a meridian flip correct? What's happening is that scheduler handles calibration failures IF it was in the steps..i.e.</div><div class=""><br class=""></div><div class="">Track --> Focus --> Align --> Guide --> Capture. If at "Guide" calibration fails then it handles that. Right now, after capturing, the scheduler just LOGS the guide calibration results but does not handle them. Capture module should have been aborted if calibration fails, and then that would have been handled by the scheduler... but again, what would cause calibration in the middle of capture? meridian flip?</div><div class=""><br class=""></div><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">--</div><div class="">Best Regards,<br class="">Jasem Mutlaq<br class=""></div><div class=""><br class=""></div></div></div></div></div></div><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 6, 2020 at 11:30 PM Hy Murveit <<a href="mailto:murveit@gmail.com" target="_blank" class="">murveit@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Eric, Jasem,<br class=""><div class=""><br class=""></div><div class="">Reporting a possible scheduler bug.</div><div class=""><br class=""></div><div class="">Jo (@ElCorazon) sent me a log</div><div class=""><a href="https://www.dropbox.com/s/n8icvn90fhunjfl/log_20-53-07.txt.gz?dl=0" style="font-family:verdana" target="_blank" class="">https://www.dropbox.com/s/n8icvn90fhunjfl/log_20-53-07.txt.gz?dl=0</a><br class=""></div><div class="">which I analyzed and my conclusion is that star detection caused guider calibration to fail at 01:15:54 (see below)</div><div class=""><br class=""></div><div class="">[2020-12-05T01:15:54.614 CST INFO ][     <a href="http://org.kde.kstars.ekos.guide/" target="_blank" class="">org.kde.kstars.ekos.guide</a>] - "Lost track of the guide star. Try increasing the square size or reducing pulse duration."<br class="">[2020-12-05T01:15:54.617 CST DEBG ][   <a href="http://org.kde.kstars.ekos.capture/" target="_blank" class="">org.kde.kstars.ekos.capture</a>] - Guiding state changed from "Calibrating" to "Calibration error"<br class=""></div><div class=""><br class=""></div><div class="">and (ignoring that issue) the scheduler recognized, I suppose, that guider failed</div><div class=""><br class=""></div><div class="">[2020-12-05T01:15:54.624 CST DEBG ][ <a href="http://org.kde.kstars.ekos.scheduler/" target="_blank" class="">org.kde.kstars.ekos.scheduler</a>] - Guide State "Calibration error"<br class=""></div><div class=""><br class=""></div><div class="">but the scheduler didn't seem to restart the guiding calibration. Basically nothing happens until 1:57:56 when I assume Jo restarted things.</div><div class=""><br class=""></div><div class="">[2020-12-05T01:57:56.852 CST INFO ][ <a href="http://org.kde.kstars.ekos.scheduler/" target="_blank" class="">org.kde.kstars.ekos.scheduler</a>] - Scheduler is stopping...<br class=""></div><div class=""><br class=""></div><div class="">I assume the scheduler should try and restart the guider, but there are no .guide nor .scheduler messages between 1:15:54 and 1:57:56</div><div class=""><br class=""></div><div class="">Hy</div></div>
</blockquote></div>
</blockquote></div>
</div></div></blockquote></div>
</blockquote></div>
</div></blockquote></div><br class=""></body></html>