Refactor polynomial code in focus and other small changes
ClosedPublic

Authored by murveit on Jan 3 2020, 9:12 AM.

Details

Summary

Refactor the polynomial code so it can be shared between the polynomial focus algorithm and the linear focus algorithm.
The Linear Focus Algorithm now plots a polynomial fit to its data, though it doesn't use that polynomial (yet).
The plan is to add the use of the polynomial in a future change to the linear focus algorithm.
Changed the name of a FocusParams field to make it more sensible--it currentPosition becomes startPosition.
Fixed a small bug where the red indices printed on the circles in the focus plot were lost when panning/zooming.

Test Plan

The refactor and name change shouldn't affect performance, so to test that, see that polynomial and linear focus still solve focus using the simulator with reasonable parameters.
See that the linear focus module now plots a polynomial graph when it gets a polynomial fit.
Note that the bug, where the numbers on the focus sample points disappeared when zooming & panning, no longer happens.

Diff Detail

Repository
R321 KStars
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
murveit created this revision.Jan 3 2020, 9:12 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptJan 3 2020, 9:12 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
murveit requested review of this revision.Jan 3 2020, 9:12 AM
mutlaqja accepted this revision.Jan 3 2020, 9:56 PM
This revision is now accepted and ready to land.Jan 3 2020, 9:56 PM
This revision was automatically updated to reflect the committed changes.