Skip to content

Internal Guider fixes

Hy Murveit requested to merge murveit/kstars:guider-fix4 into master

Several fixes for the internal guider:

  1. GuideStars starMap QVector can be uninitialized when used in getDrift(). This can happen when clouds basically block the field of view for a short while, causing findGuideStar() to call selectGuideStar() which previously didn't initialize starMap.
  • guidestars.cpp/h
  1. Guider seems to accept all blobs in newFITS and call setCaptureComplete, which starts a guide iteration, even if the blob is a sub. At least I saw that in the simulator. Added a test in newFITS to make sure the blob is in GUIDE mode (similar to the test in capture).
  • guide.cpp
  1. dither() currently checks its position (and whether to terminate) based on the last time the guide star was located, but that was before the last dither pulse was emitted. The guide star has likely moved since. It will now re-find the guide star to determine the current star position and then decide whether to terminate.
  • internalguider.cpp:
  1. Reimplemented the code that checks for lost stars in dither, it's much simpler now. Removed the getLastStarPosition method
  • internalguider.cpp, gmath.cpp/h
  1. Previously GPG didn't honor the enable/disable RA guiding checkbox on the main Guiding page. Fixed.
  • guide.cpp, gmath.cpp

Other Notes

The QVector fix (1) is the crash reported by @alacant in https://indilib.org/forum/ekos/7391-kstars-crash-latest-git.html He sent me his log, and it seemed to point to this part of the code, which clearly needed improvement. It is hard to reproduce the issue, since basically his guiding was failing, probably clouds, when stressed the system into this edge case.

Testing

5 is testable. When RA guiding is disabled and GPG is active, you should see GPG being reset in the log after the checkbox is checked, and no RA pulses from then on. When it is re-enabled, you should see GPG being reset again and RA pulses starting again, and GPG debug messages in the log.

The other fixes relate to cases when stars are lost and is more difficult to test. I added (and then removed) code simulating a lost guide star to test 4.

Merge request reports