Package algorithm
Class TrackingDataProcessor
java.lang.Object
algorithm.TrackingDataProcessor
This class provides the methods for processing the measurements. (
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
getAccuracy
(double expectedDistance, AverageMeasurement firstAverageMeasurement, AverageMeasurement secondAverageMeasurement) This method computes the distance of two average points.static Quaternion
getAccuracyRotation
(Quaternion expectedRotation, Measurement firstMeasurement, Measurement secondMeasurement) This method gets a quaternion (four double values) and two measurements.static BoxPlot
getBoxPlot
(List<Double> values) This method calculates the values for a boxplot.
-
Constructor Details
-
TrackingDataProcessor
public TrackingDataProcessor()
-
-
Method Details
-
getAccuracy
public static double getAccuracy(double expectedDistance, AverageMeasurement firstAverageMeasurement, AverageMeasurement secondAverageMeasurement) This method computes the distance of two average points. Then the expected distance is subtracted from the distance of the points.- Parameters:
expectedDistance
- - value of type doublefirstAverageMeasurement
- - value of type AverageMeasurementsecondAverageMeasurement
- - value of type AverageMeasurement- Returns:
- accurate - the distance
-
getAccuracyRotation
public static Quaternion getAccuracyRotation(Quaternion expectedRotation, Measurement firstMeasurement, Measurement secondMeasurement) This method gets a quaternion (four double values) and two measurements. With the method getRotation the quaternion of firstMeasurement is fetched. From this value, the second quaternion is subtracted from the second measurement. Then the expected quaternion is subtracted.- Parameters:
expectedRotation
- - of type quaternionfirstMeasurement
- - of type MeasurementsecondMeasurement
- - of type Measurement- Returns:
- result - of type quaternion
-
getBoxPlot
This method calculates the values for a boxplot. The values are sorted by using the sort method of the Collections class. After that, an array is created from the ArrayList using the method toDoubleArray, because the Percentile class can only count on arrays. The values are calculated using the available methods in these two classes.- Parameters:
values
- - a list with values- Returns:
- boxPlot - of type boxPlot with results
-