Bug 422940 - EKOS - PHD2 may fail calibration without notice
Summary: EKOS - PHD2 may fail calibration without notice
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: TallFurryMan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-13 22:29 UTC by TallFurryMan
Modified: 2020-08-24 06:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: v3.4.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TallFurryMan 2020-06-13 22:29:33 UTC
SUMMARY


STEPS TO REPRODUCE
1. Launch PHD2, no equipment connection
2. Launch Ekos with Telescope and CCD Simulators, PHD2 guider
3. Remain on NCP, start guiding

OBSERVED RESULT

Guiding at NCP fails because PHD2 doesn't see the guide star move enough.
If the guide star doesn't move at all (0 pixel offset), PHD2 will abort
calibration without sending a message. In that situation, Ekos remains
waiting for the end of the procedure.

PHD2 is in looping mode when it abandons calibration without notice. Therefore
Ekos cannot resume guiding anymore because guiding frames are being received.
The UI prevents stopping because guiding is not actually active. The state
machine is lost and situation cannot be recovered, even with
a disconnect/reconnect.

This issue, while very specific, shows that there are holes in the guiding
faut tolerance.

EXPECTED RESULT

There should be a timeout to waiting for the calibration procedure to end.
By default, not considering frame download, it takes PHD2/Simulators ~25s
to calibrate when everything works, and ~75s to fail if the star doesn't
move enough (there is no failure if the star doesn't move at all).
Ekos should poll for PHD2 state and execute proper state machine recovery.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ubuntu 18.04
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.12.5

ADDITIONAL INFORMATION
Comment 1 Paul 2020-08-05 02:47:30 UTC
I can confirm this issue but it has only just started happening with a very recent build.
Comment 2 TallFurryMan 2020-08-24 06:33:15 UTC
This is fixed by 11130020, using the calibration timeout.

This behaviour is tested in test_ekos_guide, using Simulators and Polaris as guide star. The Simulator does not move Polaris far enough for PHD2 to detect a movement, and PHD2 switches from calibrating to looping without sending a notification (failed guarantee). The calibration timeout of the Guide Module catches this situation.

Note the workaround also works for guide stars that are hot pixels.