Package com.irurueta.geometry
Class Accuracy3D
java.lang.Object
com.irurueta.geometry.Accuracy
com.irurueta.geometry.Accuracy3D
- All Implemented Interfaces:
Serializable
Contains methods to convert covariance matrices into ellipsoids representing accuracy
with requested confidence.
- See Also:
-
Field Summary
Fields inherited from class com.irurueta.geometry.Accuracy
confidence, sqrtSingularValues, standardDeviationFactor, u -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Accuracy3D(double confidence) Constructor.Accuracy3D(com.irurueta.algebra.Matrix covarianceMatrix) Constructor.Accuracy3D(com.irurueta.algebra.Matrix covarianceMatrix, double confidence) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionFlattens accuracy representation to 2D by taking into account only x and y coordinates and ignoring variance related to z coordinates.intGets number of dimensions.Intersects ellipsoid representing this accuracy with horizontal xy plane.private EllipseintersectWithPlane(double standardDeviationFactor) Intersects ellipsoid representing this accuracy with provided standard deviation factor and with horizontal xy plane.Converts provided covariance matrix into a 3D ellipsoid taking into account current confidence and standard deviation factor.private EllipsoidtoEllipsoid(double standardDeviationFactor) Converts provided covariance matrix into a 3D ellipsoid taking into account current confidence and standard deviation factor.Methods inherited from class com.irurueta.geometry.Accuracy
getAverageAccuracy, getConfidence, getCovarianceMatrix, getLargestAccuracy, getSmallestAccuracy, getStandardDeviationFactor, setConfidence, setCovarianceMatrix, setStandardDeviationFactor
-
Constructor Details
-
Accuracy3D
public Accuracy3D()Constructor. -
Accuracy3D
public Accuracy3D(com.irurueta.algebra.Matrix covarianceMatrix) throws com.irurueta.algebra.NonSymmetricPositiveDefiniteMatrixException Constructor.- Parameters:
covarianceMatrix- covariance matrix to be set. Must be 3x3 and positive definite.- Throws:
IllegalArgumentException- if provided matrix is not square (it must also be positive definite to be properly converted to an ellipsoid).com.irurueta.algebra.NonSymmetricPositiveDefiniteMatrixException- if provided matrix is not symmetric and positive definite.
-
Accuracy3D
public Accuracy3D(double confidence) Constructor.- Parameters:
confidence- confidence of provided accuracy of an estimated position.- Throws:
IllegalArgumentException- if provided value is not within 0 and 1.
-
Accuracy3D
public Accuracy3D(com.irurueta.algebra.Matrix covarianceMatrix, double confidence) throws com.irurueta.algebra.NonSymmetricPositiveDefiniteMatrixException Constructor.- Parameters:
covarianceMatrix- covariance matrix to be set. Must be 3x3 and positive definite.confidence- confidence of provided accuracy of an estimated position.- Throws:
IllegalArgumentException- if provided matrix is not square (it must also be positive definite to be properly converted to an ellipsoid), or if provided confidence value is not within 0 and 1.com.irurueta.algebra.NonSymmetricPositiveDefiniteMatrixException- if provided matrix is not symmetric and positive definite.
-
-
Method Details
-
getNumberOfDimensions
public int getNumberOfDimensions()Gets number of dimensions.- Specified by:
getNumberOfDimensionsin classAccuracy- Returns:
- always returns 3.
-
toEllipsoid
Converts provided covariance matrix into a 3D ellipsoid taking into account current confidence and standard deviation factor.- Returns:
- ellipsoid representing accuracy of covariance matrix with current confidence and standard deviation factor.
- Throws:
NullPointerException- if covariance matrix has not been provided yet.InvalidRotationMatrixException- if rotation cannot be properly determined.
-
flattenTo2D
Flattens accuracy representation to 2D by taking into account only x and y coordinates and ignoring variance related to z coordinates.- Returns:
- flattened accuracy representation in 2D.
- Throws:
NullPointerException- if covariance matrix is not defined.GeometryException- if intersection cannot be computed.
-
intersectWithPlane
Intersects ellipsoid representing this accuracy with horizontal xy plane.- Returns:
- intersected ellipse.
- Throws:
NullPointerException- if covariance matrix is not defined.GeometryException- if intersection cannot be computed.
-
toEllipsoid
Converts provided covariance matrix into a 3D ellipsoid taking into account current confidence and standard deviation factor.- Parameters:
standardDeviationFactor- standard deviation factor.- Returns:
- ellipsoid representing accuracy of covariance matrix with provided standard deviation factor.
- Throws:
NullPointerException- if covariance matrix has not been provided yet.InvalidRotationMatrixException- if rotation cannot be properly determined.
-
intersectWithPlane
Intersects ellipsoid representing this accuracy with provided standard deviation factor and with horizontal xy plane.- Parameters:
standardDeviationFactor- standard deviation factor.- Returns:
- intersected ellipse.
- Throws:
NullPointerException- if covariance matrix is not defined.GeometryException- if intersection cannot be computed.
-