Algorithm¶
Section author: Luke Frisken <l.frisken@gmail.com>
The com.atc.simulator.prediction_service.engine.algorithms.java
package contains all of the java implementations for the different algorithm
types.
The most relavent algorithm employed in this project is in the
algorithms.java.JavaLMLeastSquaresAlgorithmV3
class, and also worth
checking out for understanding is algorithms.java.JavaPredictionAlgorithm
.
Each time the algorithm is executed it uses the algorithms.java.AlgorithmState
passed to it from the PredictionEngineThread
from where it was stored in the PredictionEngineSystemStateDatabase
keyed to the aircraft which is currently having its prediction created.
It uses the AlgorithmState to store persisent state information about the algorithm
between runs of the algorithm in WorkItems.
LMLeastSquaresV3 Algorithm¶
The algorithm in algorithms.java.JavaLMLeastSquaresAlgorithmV3
is the
latest iteration. Old iterations are kept for reference and testing purposed.
This algorithm uses Levenberg-Marquardt Least Squares Circle Fit method to calculate a circle which matches recorded location points.
For an overview of this method of circle calculation, see the research done in Circle Fitting Research.
It also uses algorithms.java.JavaLinearAlgorithm
to calculate a linear projection
to submit in the prediction. Then a blending of the two prediction lines occurs
to produce the centre line which is then passed with the other two lines for
rendering in the Display