Class VectorHelper

java.lang.Object
org.vast.swe.SWEHelper
org.vast.swe.helper.VectorHelper
Direct Known Subclasses:
GeoPosHelper, RasterHelper

public class VectorHelper extends SWEHelper

Helper class to create SWE structures used in vector math

Since:
March 2016
  • Field Details

    • DEF_COORD

      public static final String DEF_COORD
    • DEF_ROT_MATRIX

      public static final String DEF_ROT_MATRIX
    • DEF_ORIENTATION

      public static final String DEF_ORIENTATION
    • DEF_ORIENTATION_EULER

      public static final String DEF_ORIENTATION_EULER
    • DEF_ORIENTATION_QUAT

      public static final String DEF_ORIENTATION_QUAT
    • DEF_UNIT_VECTOR

      public static final String DEF_UNIT_VECTOR
    • DEF_ROW

      public static final String DEF_ROW
    • DEF_LOCATION

      public static final String DEF_LOCATION
    • DEF_DISTANCE

      public static final String DEF_DISTANCE
    • DEF_VELOCITY

      public static final String DEF_VELOCITY
    • DEF_ACCELERATION

      public static final String DEF_ACCELERATION
    • DEF_ANGULAR_VELOCITY

      public static final String DEF_ANGULAR_VELOCITY
    • DEF_ANGULAR_ACCEL

      public static final String DEF_ANGULAR_ACCEL
    • DEF_ANGLE

      public static final String DEF_ANGLE
  • Constructor Details

    • VectorHelper

      public VectorHelper()
  • Method Details

    • newVector3D

      protected Vector newVector3D()
    • createVector3

      public SWEBuilders.VectorBuilder createVector3()
      Creates a 3D vector with arbitrary axes called u1, u2, u3
      Returns:
      A builder to set other options and build the final vector
    • newVector3

      public Vector newVector3(String def, String refFrame)
      Creates a 3D vector with arbitrary axes called u1, u2, u3
      Parameters:
      def - semantic definition of velocity vector (must be set)
      refFrame - reference frame within which the vector is expressed
      Returns:
      the new Vector component object
    • createUnitVectorXYZ

      public SWEBuilders.VectorBuilder createUnitVectorXYZ()
      Creates a 3D unit vector in an ortho-normal frame with X/Y/Z axes
      Returns:
      A builder to set other options and build the final vector
    • newUnitVectorXYZ

      public Vector newUnitVectorXYZ(String def, String refFrame)
      Creates a 3D unit vector in an ortho-normal frame with X/Y/Z axes
      Parameters:
      def - semantic definition of vector (if null, DEF_UNIT_VECTOR is used)
      refFrame - reference frame within which the vector is expressed
      Returns:
      the new Vector component object
    • createLocationVectorXYZ

      public SWEBuilders.VectorBuilder createLocationVectorXYZ(String uomCode)
      Creates a 3D location vector in an ortho-normal frame with X/Y/Z axes
      Parameters:
      uomCode - unit of distance to use on all 3 axes
      Returns:
      A builder to set other options and build the final vector
    • newLocationVectorXYZ

      public Vector newLocationVectorXYZ(String def, String refFrame, String uomCode)
      Creates a 3D location vector in an ortho-normal frame with X/Y/Z axes
      Parameters:
      def - semantic definition of location vector (if null, DEF_LOCATION is used)
      refFrame - reference frame within which the vector is expressed
      uomCode - unit of distance to use on all 3 axes
      Returns:
      the new Vector component object
    • createVelocityVector

      public SWEBuilders.VectorBuilder createVelocityVector(String uomCode)
      Creates a 3D velocity vector in an ortho-normal frame with X/Y/Z axes
      Parameters:
      uomCode - unit of velocity to use on all 3 axes
      Returns:
      A builder to set other options and build the final vector
    • newVelocityVector

      public Vector newVelocityVector(String def, String refFrame, String uomCode)
      Creates a 3D velocity vector in an ortho-normal frame with X/Y/Z axes
      Parameters:
      def - semantic definition of velocity vector (if null, DEF_VELOCITY is used)
      refFrame - reference frame within which the vector is expressed
      uomCode - unit of velocity to use on all 3 axes
      Returns:
      the new Vector component object
    • createAccelerationVector

      public SWEBuilders.VectorBuilder createAccelerationVector(String uomCode)
      Creates a 3D acceleration vector in an ortho-normal frame with X/Y/Z axes
      Parameters:
      uomCode - unit of acceleration to use on all 3 axes
      Returns:
      A builder to set other options and build the final vector
    • newAccelerationVector

      public Vector newAccelerationVector(String def, String refFrame, String uomCode)
      Creates a 3D acceleration vector in an ortho-normal frame with X/Y/Z axes
      Parameters:
      def - semantic definition of acceleration vector (if null, DEF_ACCELERATION is used)
      refFrame - reference frame within which the vector is expressed
      uomCode - unit of acceleration to use on all 3 axes
      Returns:
      the new Vector component object
    • createEulerAngles

      public SWEBuilders.VectorBuilder createEulerAngles(String uomCode)
      Creates a 3D euler angles vector with unspecified order of rotations about X/Y/Z axes.
      Parameters:
      uomCode - angular unit to use on all 3 axes
      Returns:
      A builder to set other options and build the final vector
    • newEulerAngles

      public Vector newEulerAngles(String refFrame, String uomCode)
      Creates a 3D euler angles vector with unspecified order of rotations about X/Y/Z axes.
      This is only used when order and axes of rotations are specified separately.
      Parameters:
      refFrame - reference frame within which the angles are expressed
      uomCode - angular unit to use on all 3 axes
      Returns:
      the new Vector component object
    • createAngularVelocityVector

      public SWEBuilders.VectorBuilder createAngularVelocityVector(String uomCode)
      Creates a 3D angular velocity vector in an ortho-normal frame with X/Y/Z axes
      Parameters:
      uomCode - unit of acceleration to use on all 3 axes
      Returns:
      A builder to set other options and build the final vector
    • newAngularVelocityVector

      public Vector newAngularVelocityVector(String def, String refFrame, String uomCode)
      Creates a 3D angular velocity vector in an ortho-normal frame with X/Y/Z axes
      Parameters:
      def - semantic definition of angular velocity vector (if null, DEF_ANGULAR_VELOCITY is used)
      refFrame - reference frame within which the vector is expressed
      uomCode - unit of acceleration to use on all 3 axes
      Returns:
      the new Vector component object
    • newMatrix

      public Matrix newMatrix(int nRows, int nCols)
      Creates a matrix (i.e. 2D tensor) with no definition nor reference frame
      Parameters:
      nRows - number of rows
      nCols - number of columns
      Returns:
      the new Matrix component object
    • newMatrix

      public Matrix newMatrix(String def, String refFrame, int nRows, int nCols)
      Creates a matrix (i.e. 2D tensor)
      Parameters:
      def - semantic definition of matrix (e.g. rotation matrix, stress matrix, etc.)
      refFrame - reference frame within which the matrix is expressed, if applicable, null otherwise
      nRows - number of rows
      nCols - number of columns
      Returns:
      the new Matrix component object
    • newRotationMatrix

      public Matrix newRotationMatrix(String refFrame)
      Creates a 3x3 rotation matrix
      Parameters:
      refFrame - reference frame within which the rotation matrix is expressed
      Returns:
      the new Matrix component object