Skip to content

State handling for paused capturing before meridian flip corrected

If a capture sequence has been paused before a meridian flip and continued afterwards, the capture sequence directly continues instead of executing the necessary activities like aligning, dithering, focusing etc - whatever was specified before the MF happened.

With this fix, a capture sequence can be paused before a meridian flip and seamlessly continued when the meridian flip has completed.

Test scenario: Move the mount to a location close before the meridian, start a capture sequence with at least two frames and press the pause button during the first frame being captured. Now wait until the meridian flip happens. As soon as the flip is completed, press the "Start" button and check, whether aligning, focusing, and dithering take place as configured.

Update 31.08.2020: Added the fix for the problem that the meridian flip hangs for the second meridian flip.

Test scenario:

  • Slew the mount to a position close before the meridian and start a capture sequence without the scheduler (haven’t tested it whether it works with the scheduler as well)
  • Wait until the meridian flip has succeeded and capturing continues.
  • Stop capturing and slew to another position that is now close before the meridian and start the capture sequence again.
  • As soon as the mount crosses the meridian, the mount tab shows " Waiting for Capture“
  • No meridian flip happens, the capture sequence continues

Even stopping the capture sequence does not lead to a meridian flip.

Update 27.09.2020 Set of basic test cases added.

The set of basic test cases is ready. I decided to post them with this branch, since they are interdependent: Without the fix for the problem with the second meridian flip, the test cases won't run. And without having these test cases executed, I would not recommend to change anything related to the meridian flip.

Properly executing a meridian flip and continuing afterwards in exactly the same way as before is a challenge:

  • If no capturing is running, it should simply take place.
  • If capturing is running, the meridian flip should wait until the current frame is captured, capturing is suspended, the meridian flip takes place and capturing continues where it was suspended. This needs to be tested if a meridian flip happens in the middle of a capture sequence or between two of them. Therefore, all capture tests are executed for a 2xLLL sequence and a 2xRGB sequence. In addition:
    • if guiding was active, guiding should be activated again after the meridian flip and afterwards guiding should continue
    • if an alignment has taken place after the last slew, a re-alignment should be executed after the flip and before guiding and capturing.

All this could be combined with the pre-capturing actions of focusing and dithering.

The tests are available both for the internal guider and for PHD2. For testing with PHD2, invoke the test with the arguments -guider PHD2.

Many thanks to @edejouhanet for his great work on the test framework for KStars UI tests!!

Update 02.10.2020 - Ready for review

Test cases finished covering the fixes contained in this MR:

  • Executing a meridian flip while capturing is paused. This test case is quite straight forward and tests all combinations of capturing, dithering and focusing.
  • Multiple meridian flips: this is implicitly tested by executing several test cases in a row. Since the code changes touches checks for correct pier side after a meridian flip, a specific test case is added. In some cases, the mount does not execute a pier side flip - against the expectation of EKOS. EKOS detects this by the pier side and issues a new meridian flip after 4 minutes of delay. This feature is tested using the "FLIP_HA" feature of the Telescope Simulator.

@edejouhanet, @murveit, it would be great if you could review my changes.

Edited by Wolfgang Reissenberger

Merge request reports