Refactor polynomial code in focus and other small changes

Authored by murveit on Jan 3 2020, 9:44 PM.

Description

Refactor polynomial code in focus and other small changes

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.

Reviewers: mutlaqja, lancaster

Reviewed By: mutlaqja

Subscribers: kde-edu

Tags: KDE Edu

Differential Revision: https://phabricator.kde.org/D26384

Details

Committed
mutlaqjaJan 3 2020, 9:56 PM
Reviewer
mutlaqja
Differential Revision
D26384: Refactor polynomial code in focus and other small changes
Parents
R321:e60b54ec25a1: KStars v3.4.0 cycle begins
Branches
Unknown
Tags
Unknown