Class Accuracy3D

java.lang.Object
com.irurueta.geometry.Accuracy
com.irurueta.geometry.Accuracy3D
All Implemented Interfaces:
Serializable

public class Accuracy3D extends Accuracy
Contains methods to convert covariance matrices into ellipsoids representing accuracy with requested confidence.
See Also:
  • 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:
      getNumberOfDimensions in class Accuracy
      Returns:
      always returns 3.
    • toEllipsoid

      public Ellipsoid toEllipsoid() throws InvalidRotationMatrixException
      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

      public Accuracy2D flattenTo2D() throws GeometryException
      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

      public Ellipse intersectWithPlane() throws GeometryException
      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

      private Ellipsoid toEllipsoid(double standardDeviationFactor) throws InvalidRotationMatrixException
      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

      private Ellipse intersectWithPlane(double standardDeviationFactor) throws GeometryException
      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.