Class QuaternionStepIntegrator

java.lang.Object
com.irurueta.navigation.inertial.calibration.gyroscope.QuaternionStepIntegrator
Direct Known Subclasses:
EulerQuaternionStepIntegrator, MidPointQuaternionStepIntegrator, RungeKuttaQuaternionStepIntegrator, SuhQuaternionStepIntegrator, TrawnyQuaternionStepIntegrator, YuanQuaternionStepIntegrator

public abstract class QuaternionStepIntegrator extends Object
Contains common methods and factory methods for all implementations of this class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Default quaternion step integrator type.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static void
    computeAverageAngularSpeed(double initialWx, double initialWy, double initialWz, double currentWx, double currentWy, double currentWz, com.irurueta.algebra.Matrix result)
    Computes average angular speed into matrix form at mid-point between initial timestamp t0 and end timestamp t1.
    protected static void
    computeOmegaSkew(com.irurueta.algebra.Matrix omega, com.irurueta.algebra.Matrix result)
    Computes the skew antisymmetric matrix of a vector matrix containing angular speed.
    protected static void
    computeTimeDerivative(com.irurueta.algebra.Matrix quaternion, com.irurueta.algebra.Matrix omegaSkew, com.irurueta.algebra.Matrix result)
    Computes the time derivative of a quaternion at a given angular speed.
    protected static void
    copyAngularSpeedToMatrix(double wx, double wy, double wz, com.irurueta.algebra.Matrix result)
    Copies provided angular speed coordinates into a matrix.
    Creates a quaternion step integrator using default type.
    Creates a quaternion step integrator using provided type.
    Gets type of this integrator.
    abstract void
    integrate(com.irurueta.geometry.Quaternion initialAttitude, double initialWx, double initialWy, double initialWz, double currentWx, double currentWy, double currentWz, double dt, com.irurueta.geometry.Quaternion result)
    Performs an integration step.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • QuaternionStepIntegrator

      public QuaternionStepIntegrator()
  • Method Details

    • getType

      public abstract QuaternionStepIntegratorType getType()
      Gets type of this integrator.
      Returns:
      indicates type of this integrator.
    • integrate

      public abstract void integrate(com.irurueta.geometry.Quaternion initialAttitude, double initialWx, double initialWy, double initialWz, double currentWx, double currentWy, double currentWz, double dt, com.irurueta.geometry.Quaternion result) throws com.irurueta.geometry.RotationException
      Performs an integration step.
      Parameters:
      initialAttitude - initial attitude.
      initialWx - initial x-coordinate rotation velocity at initial timestamp expressed in radians per second (rad/s).
      initialWy - initial y-coordinate rotation velocity at initial timestamp expressed in radians per second (rad/s).
      initialWz - initial z-coordinate rotation velocity at initial timestamp expressed in radians per second (rad/s).*
      currentWx - end x-coordinate rotation velocity at current timestamp expressed in radians per second (rad/s).
      currentWy - end y-coordinate rotation velocity at current timestamp expressed in radians per second (rad/s).
      currentWz - end z-coordinate rotation velocity at current timestamp expressed in radians per second (rad/s).
      dt - time step expressed in seconds.
      result - instance where result of integration will be stored.
      Throws:
      com.irurueta.geometry.RotationException - if a numerical error occurs.
    • create

      Creates a quaternion step integrator using provided type.
      Parameters:
      type - type of quaternion step integrator.
      Returns:
      created quaternion step integrator.
    • create

      public static QuaternionStepIntegrator create()
      Creates a quaternion step integrator using default type.
      Returns:
      created quaternion step integrator.
    • computeTimeDerivative

      protected static void computeTimeDerivative(com.irurueta.algebra.Matrix quaternion, com.irurueta.algebra.Matrix omegaSkew, com.irurueta.algebra.Matrix result) throws com.irurueta.algebra.WrongSizeException
      Computes the time derivative of a quaternion at a given angular speed.
      Parameters:
      quaternion - column vector matrix containing quaternion to compute time derivative for. Must be 4x1.
      omegaSkew - instance being reused containing the skew antisymmetric matrix. Must be 4x4.
      result - instance where computed time derivative will be stored. Must be 4x1.
      Throws:
      com.irurueta.algebra.WrongSizeException - if provided matrices do not have proper size.
    • computeOmegaSkew

      protected static void computeOmegaSkew(com.irurueta.algebra.Matrix omega, com.irurueta.algebra.Matrix result)
      Computes the skew antisymmetric matrix of a vector matrix containing angular speed.
      Parameters:
      omega - column vector matrix containing angular speed. Must be 3x1.
      result - instance where result must be stored. Must be 4x4.
    • copyAngularSpeedToMatrix

      protected static void copyAngularSpeedToMatrix(double wx, double wy, double wz, com.irurueta.algebra.Matrix result)
      Copies provided angular speed coordinates into a matrix.
      Parameters:
      wx - x-coordinate of angular speed expressed in radians per second (rad/s).
      wy - y-coordinate of angular speed expressed in radians per second (rad/s).
      wz - z-coordinate of angular speed expressed in radians per second (rad/s).
      result - instance where angular speed coordinates are copied to.
    • computeAverageAngularSpeed

      protected static void computeAverageAngularSpeed(double initialWx, double initialWy, double initialWz, double currentWx, double currentWy, double currentWz, com.irurueta.algebra.Matrix result)
      Computes average angular speed into matrix form at mid-point between initial timestamp t0 and end timestamp t1.
      Parameters:
      initialWx - initial x-coordinate rotation velocity at initial timestamp expressed in radians per second (rad/s).
      initialWy - initial y-coordinate rotation velocity at initial timestamp expressed in radians per second (rad/s).
      initialWz - initial z-coordinate rotation velocity at initial timestamp expressed in radians per second (rad/s).*
      currentWx - end x-coordinate rotation velocity at current timestamp expressed in radians per second (rad/s).
      currentWy - end y-coordinate rotation velocity at current timestamp expressed in radians per second (rad/s).
      currentWz - end z-coordinate rotation velocity at current timestamp expressed in radians per second (rad/s).
      result - instance where result will be stored. Must be 3x1.