Class ECEFKinematicsEstimatorTest

java.lang.Object
com.irurueta.navigation.inertial.estimators.ECEFKinematicsEstimatorTest

class ECEFKinematicsEstimatorTest extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final double
    Maximum allowed difference between the estimator and the in-test reference implementation of Kinematics_ECEF.m.
    private static final double
     
    private static final double
    Maximum allowed difference in angular rate, expressed in radians per second, between the ECEF, ECI and NED kinematics estimators.
    private static final double
    Maximum allowed difference in specific force, expressed in meters per squared second, between the ECEF, ECI and NED kinematics estimators.
    private static final double
     
    private static final double
    Maximum absolute attitude variation per Euler angle, expressed in degrees, of the second pass of the randomised tests.
    private static final double
     
    private static final double
    Time interval, expressed in seconds, of the second pass of the randomised tests.
    private static final double
     
    private static final double
     
    private static final double
     
    private static final double
     
    private static final double
     
    private static final double
     
    private static final double
     
    private static final double
    Factor used to average the velocities at the start and the end of a time interval.
    private static final double
     
    private static final double
     
    private static final double
    Minimum difference in specific force, expressed in meters per squared second, that must be observed when gravity is evaluated at the end instead of at the start of the round trip long time interval.
    private static final double
     
    private static final double
     
    private static final double
     
    private static final double
    X coordinate of the round trip angular rate, expressed in radians per second.
    private static final double
    Y coordinate of the round trip angular rate, expressed in radians per second.
    private static final double
    Z coordinate of the round trip angular rate, expressed in radians per second.
    private static final double
    Maximum allowed difference between the kinematics fed to ECEFInertialNavigator and the kinematics recovered by ECEFKinematicsEstimator from the navigated frame.
    private static final double
    X coordinate of the round trip specific force, expressed in meters per squared second.
    private static final double
    Y coordinate of the round trip specific force, expressed in meters per squared second.
    private static final double
    Z coordinate of the round trip specific force, expressed in meters per squared second.
    private static final double
    Longest time interval, expressed in seconds, used by the navigator round trip tests.
    private static final double
    Pitch angle of the round trip body at the start of the interval, expressed in degrees.
    private static final double
    Roll angle of the round trip body at the start of the interval, expressed in degrees.
    private static final double[]
    Time intervals, expressed in seconds, used by the navigator round trip tests.
    private static final double
    Down velocity of the round trip body at the start of the interval, expressed in meters per second.
    private static final double
    East velocity of the round trip body at the start of the interval, expressed in meters per second.
    private static final double
    North velocity of the round trip body at the start of the interval, expressed in meters per second.
    private static final double
    Yaw angle of the round trip body at the start of the interval, expressed in degrees.
    private static final double
     
    private static final long
    Seed of the randomizers used by the tests, fixed so that tests are deterministic.
    private static final double
     
    private static final int
    Number of randomly generated pairs of frames checked on each pass of the randomised tests.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static double
    Computes the Euclidean distance between the angular rates of two body kinematics.
    private static void
    checkEstimate(com.irurueta.statistics.UniformRandomizer randomizer, double timeIntervalSeconds, double maxAngleVariationDegrees)
    Checks that all instance estimate overloads are consistent with each other for a randomly generated pair of frames.
    private static void
    checkEstimateAndReturnNew(com.irurueta.statistics.UniformRandomizer randomizer, double timeIntervalSeconds, double maxAngleVariationDegrees)
    Checks that all instance estimateAndReturnNew overloads are consistent with each other for a randomly generated pair of frames.
    private static void
    checkEstimateKinematics(com.irurueta.statistics.UniformRandomizer randomizer, double timeIntervalSeconds, double maxAngleVariationDegrees)
    Checks that all static estimateKinematics overloads are consistent with each other and with the in-test reference implementation for a randomly generated pair of frames.
    private static void
    checkEstimateKinematicsAndReturnNew(com.irurueta.statistics.UniformRandomizer randomizer, double timeIntervalSeconds, double maxAngleVariationDegrees)
    Checks that all static estimateKinematicsAndReturnNew overloads are consistent with each other and with the in-test reference implementation for a randomly generated pair of frames.
    private static com.irurueta.navigation.frames.NEDFrame
    createNewNedFrame(com.irurueta.navigation.frames.NEDFrame oldFrame, com.irurueta.statistics.UniformRandomizer randomizer, double maxAngleVariationDegrees)
    Creates a random NED frame at the end of the time interval by randomly modifying the frame at the start.
    private static com.irurueta.navigation.frames.NEDFrame
    createOldNedFrame(com.irurueta.statistics.UniformRandomizer randomizer)
    Creates a random NED frame at the start of the time interval.
    private static com.irurueta.statistics.UniformRandomizer
    Creates a randomizer with a fixed seed so that tests are deterministic.
    private static BodyKinematics
    Creates the body kinematics used by the navigator round trip tests.
    private static com.irurueta.navigation.frames.ECEFFrame
    Creates the ECEF frame at the start of the interval used by the navigator round trip tests.
    private static BodyKinematics
    estimateKinematics(double timeInterval, com.irurueta.navigation.frames.CoordinateTransformation c, com.irurueta.navigation.frames.CoordinateTransformation oldC, double vx, double vy, double vz, double oldVx, double oldVy, double oldVz, double x, double y, double z)
     
    private static double
    Computes the Euclidean distance between the specific forces of two body kinematics.
    (package private) void
    Checks that the ECEF, ECI and NED kinematics estimators agree for kinematically consistent pairs of frames (the position at the end of the time interval is the position at the start plus the mean velocity times the time interval, and ECI frames are obtained at the epochs of the start and the end of the time interval).
    (package private) void
    Checks that all instance estimate overloads are consistent with each other, both for a short time interval with small attitude changes and for a long time interval with large attitude changes.
    (package private) void
    Checks that all instance estimateAndReturnNew overloads are consistent with each other, both for a short time interval with small attitude changes and for a long time interval with large attitude changes.
    (package private) void
    Checks that all static estimateKinematics overloads are consistent with each other and with the in-test reference implementation, both for a short time interval with small attitude changes and for a long time interval with large attitude changes.
    (package private) void
    Checks that all static estimateKinematicsAndReturnNew overloads are consistent with each other and with the in-test reference implementation, both for a short time interval with small attitude changes and for a long time interval with large attitude changes.
    (package private) void
     
    (package private) void
     
    (package private) void
     
    (package private) void
     
    (package private) void
    Checks that every overload receiving both the current and the previous frame evaluates gravity at the position of the previous frame (start of the time interval), so that it recovers the kinematics fed to ECEFInertialNavigator.
    (package private) void
    Checks that the kinematics fed to ECEFInertialNavigator are recovered by the estimator from the navigated frame when the body rotates and gravity is evaluated at the position at the start of the interval.

    Methods inherited from class java.lang.Object

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

    • TIME_INTERVAL_SECONDS

      private static final double TIME_INTERVAL_SECONDS
      See Also:
    • LATITUDE_DEGREES

      private static final double LATITUDE_DEGREES
      See Also:
    • LONGITUDE_DEGREES

      private static final double LONGITUDE_DEGREES
      See Also:
    • HEIGHT

      private static final double HEIGHT
      See Also:
    • MIN_ANGLE_DEGREES

      private static final double MIN_ANGLE_DEGREES
      See Also:
    • MAX_ANGLE_DEGREES

      private static final double MAX_ANGLE_DEGREES
      See Also:
    • MIN_VELOCITY_VALUE

      private static final double MIN_VELOCITY_VALUE
      See Also:
    • MAX_VELOCITY_VALUE

      private static final double MAX_VELOCITY_VALUE
      See Also:
    • MAX_ANGLE_VARIATION_DEGREES

      private static final double MAX_ANGLE_VARIATION_DEGREES
      See Also:
    • LONG_TIME_INTERVAL_SECONDS

      private static final double LONG_TIME_INTERVAL_SECONDS
      Time interval, expressed in seconds, of the second pass of the randomised tests. It is long enough for second-order terms (Earth rotation during the interval, eq. (5.85)) to be observable.
      See Also:
    • LARGE_MAX_ANGLE_VARIATION_DEGREES

      private static final double LARGE_MAX_ANGLE_VARIATION_DEGREES
      Maximum absolute attitude variation per Euler angle, expressed in degrees, of the second pass of the randomised tests. It is large enough for second-order attitude terms to be observable.
      See Also:
    • SEED

      private static final long SEED
      Seed of the randomizers used by the tests, fixed so that tests are deterministic.
      See Also:
    • TIMES

      private static final int TIMES
      Number of randomly generated pairs of frames checked on each pass of the randomised tests.
      See Also:
    • MIN_POSITION_VARIATION_DEGREES

      private static final double MIN_POSITION_VARIATION_DEGREES
      See Also:
    • MAX_POSITION_VARIATION_DEGREES

      private static final double MAX_POSITION_VARIATION_DEGREES
      See Also:
    • MIN_HEIGHT_VARIATION

      private static final double MIN_HEIGHT_VARIATION
      See Also:
    • MAX_HEIGHT_VARIATION

      private static final double MAX_HEIGHT_VARIATION
      See Also:
    • MIN_VELOCITY_VARIATION

      private static final double MIN_VELOCITY_VARIATION
      See Also:
    • MAX_VELOCITY_VARIATION

      private static final double MAX_VELOCITY_VARIATION
      See Also:
    • SCALING_THRESHOLD

      private static final double SCALING_THRESHOLD
      See Also:
    • ALPHA_THRESHOLD

      private static final double ALPHA_THRESHOLD
      See Also:
    • ABSOLUTE_ERROR

      private static final double ABSOLUTE_ERROR
      Maximum allowed difference between the estimator and the in-test reference implementation of Kinematics_ECEF.m. Both perform the same arithmetic in a different order of operations, so they only differ by floating point rounding: the largest difference observed over 2000 seeded pairs of frames per pass is 2.0e-14 (time interval of 0.02 s) and 7.6e-15 (time interval of 1 s). 1e-9 leaves margin for rounding while being three orders of magnitude below the smallest algorithmic error fixed in the estimator (7.8e-7 m/s^2).
      See Also:
    • COMPARE_SPECIFIC_FORCE_ERROR

      private static final double COMPARE_SPECIFIC_FORCE_ERROR
      Maximum allowed difference in specific force, expressed in meters per squared second, between the ECEF, ECI and NED kinematics estimators. It is the smallest power of ten satisfied by the three algorithms over the seeded, kinematically consistent pairs of frames of the comparison test, where the largest observed differences are 9.9e-4 (ECEF vs. NED), 1.0e-3 (ECI vs. NED) and 2.9e-5 (ECI vs. ECEF).
      See Also:
    • COMPARE_ANGULAR_RATE_ERROR

      private static final double COMPARE_ANGULAR_RATE_ERROR
      Maximum allowed difference in angular rate, expressed in radians per second, between the ECEF, ECI and NED kinematics estimators. It is the smallest power of ten satisfied by the three algorithms over the seeded, kinematically consistent pairs of frames of the comparison test, where the largest observed difference is 1.5e-9 (both ECEF vs. NED and ECI vs. NED).
      See Also:
    • MEAN_FACTOR

      private static final double MEAN_FACTOR
      Factor used to average the velocities at the start and the end of a time interval.
      See Also:
    • ROUND_TRIP_TIME_INTERVALS

      private static final double[] ROUND_TRIP_TIME_INTERVALS
      Time intervals, expressed in seconds, used by the navigator round trip tests.
    • ROUND_TRIP_LONG_TIME_INTERVAL

      private static final double ROUND_TRIP_LONG_TIME_INTERVAL
      Longest time interval, expressed in seconds, used by the navigator round trip tests. With the round trip velocity, the positions at the start and at the end of this interval are about 36 meters apart.
      See Also:
    • ROUND_TRIP_VN

      private static final double ROUND_TRIP_VN
      North velocity of the round trip body at the start of the interval, expressed in meters per second.
      See Also:
    • ROUND_TRIP_VE

      private static final double ROUND_TRIP_VE
      East velocity of the round trip body at the start of the interval, expressed in meters per second.
      See Also:
    • ROUND_TRIP_VD

      private static final double ROUND_TRIP_VD
      Down velocity of the round trip body at the start of the interval, expressed in meters per second.
      See Also:
    • ROUND_TRIP_ROLL_DEGREES

      private static final double ROUND_TRIP_ROLL_DEGREES
      Roll angle of the round trip body at the start of the interval, expressed in degrees.
      See Also:
    • ROUND_TRIP_PITCH_DEGREES

      private static final double ROUND_TRIP_PITCH_DEGREES
      Pitch angle of the round trip body at the start of the interval, expressed in degrees.
      See Also:
    • ROUND_TRIP_YAW_DEGREES

      private static final double ROUND_TRIP_YAW_DEGREES
      Yaw angle of the round trip body at the start of the interval, expressed in degrees.
      See Also:
    • ROUND_TRIP_FX

      private static final double ROUND_TRIP_FX
      X coordinate of the round trip specific force, expressed in meters per squared second.
      See Also:
    • ROUND_TRIP_FY

      private static final double ROUND_TRIP_FY
      Y coordinate of the round trip specific force, expressed in meters per squared second.
      See Also:
    • ROUND_TRIP_FZ

      private static final double ROUND_TRIP_FZ
      Z coordinate of the round trip specific force, expressed in meters per squared second.
      See Also:
    • ROUND_TRIP_ANGULAR_RATE_X

      private static final double ROUND_TRIP_ANGULAR_RATE_X
      X coordinate of the round trip angular rate, expressed in radians per second.
      See Also:
    • ROUND_TRIP_ANGULAR_RATE_Y

      private static final double ROUND_TRIP_ANGULAR_RATE_Y
      Y coordinate of the round trip angular rate, expressed in radians per second.
      See Also:
    • ROUND_TRIP_ANGULAR_RATE_Z

      private static final double ROUND_TRIP_ANGULAR_RATE_Z
      Z coordinate of the round trip angular rate, expressed in radians per second.
      See Also:
    • ROUND_TRIP_ERROR

      private static final double ROUND_TRIP_ERROR
      Maximum allowed difference between the kinematics fed to ECEFInertialNavigator and the kinematics recovered by ECEFKinematicsEstimator from the navigated frame. Navigator and estimator implement exactly inverse equations (Groves eq. (5.73)-(5.85) and (5.36)), so the only expected difference is floating point rounding: a rounding of about 1e-16 relative in velocities of about 4e2 m/s divided by a time interval of 0.1 s gives about 1e-12 m/s^2, hence 1e-9 leaves three orders of magnitude of margin while remaining far below the smallest algorithmic error this test must detect (7.8e-7 m/s^2).
      See Also:
    • MIN_POSITION_SENSITIVITY

      private static final double MIN_POSITION_SENSITIVITY
      Minimum difference in specific force, expressed in meters per squared second, that must be observed when gravity is evaluated at the end instead of at the start of the round trip long time interval. Positions are about 36 m apart and the gravity gradient is about 3e-6 s^-2 vertically and 1.5e-6 s^-2 horizontally, which yields a difference of about 1e-4 m/s^2; 1e-6 is two orders of magnitude below that and three orders of magnitude above ROUND_TRIP_ERROR.
      See Also:
  • Constructor Details

    • ECEFKinematicsEstimatorTest

      ECEFKinematicsEstimatorTest()
  • Method Details

    • testEstimate

      @Test void testEstimate() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException
      Checks that all instance estimate overloads are consistent with each other, both for a short time interval with small attitude changes and for a long time interval with large attitude changes.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
    • testEstimateAndReturnNew

      @Test void testEstimateAndReturnNew() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException
      Checks that all instance estimateAndReturnNew overloads are consistent with each other, both for a short time interval with small attitude changes and for a long time interval with large attitude changes.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
    • testEstimateKinematics

      @Test void testEstimateKinematics() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException, com.irurueta.algebra.WrongSizeException, com.irurueta.algebra.RankDeficientMatrixException, com.irurueta.algebra.DecomposerException
      Checks that all static estimateKinematics overloads are consistent with each other and with the in-test reference implementation, both for a short time interval with small attitude changes and for a long time interval with large attitude changes.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
      com.irurueta.algebra.WrongSizeException - never happens.
      com.irurueta.algebra.RankDeficientMatrixException - never happens.
      com.irurueta.algebra.DecomposerException - never happens.
    • testEstimateKinematicsAndReturnNew

      @Test void testEstimateKinematicsAndReturnNew() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException, com.irurueta.algebra.WrongSizeException, com.irurueta.algebra.RankDeficientMatrixException, com.irurueta.algebra.DecomposerException
      Checks that all static estimateKinematicsAndReturnNew overloads are consistent with each other and with the in-test reference implementation, both for a short time interval with small attitude changes and for a long time interval with large attitude changes.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
      com.irurueta.algebra.WrongSizeException - never happens.
      com.irurueta.algebra.RankDeficientMatrixException - never happens.
      com.irurueta.algebra.DecomposerException - never happens.
    • testEstimateKinematicsWhenNegativeIntervalThrowsIllegalArgumentException

      @Test void testEstimateKinematicsWhenNegativeIntervalThrowsIllegalArgumentException() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException
      com.irurueta.geometry.InvalidRotationMatrixException
    • testEstimateKinematicsWhenInvalidCoordinateTransformationThrowsIllegalArgumentException

      @Test void testEstimateKinematicsWhenInvalidCoordinateTransformationThrowsIllegalArgumentException() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException
      com.irurueta.geometry.InvalidRotationMatrixException
    • testEstimateKinematicsWhenInvalidOldCoordinateTransformationThrowsIllegalArgumentException

      @Test void testEstimateKinematicsWhenInvalidOldCoordinateTransformationThrowsIllegalArgumentException() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException
      com.irurueta.geometry.InvalidRotationMatrixException
    • testEstimateKinematicsWhenZeroTimeIntervalReturnsZeroValues

      @Test void testEstimateKinematicsWhenZeroTimeIntervalReturnsZeroValues() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException, com.irurueta.algebra.WrongSizeException, com.irurueta.algebra.RankDeficientMatrixException, com.irurueta.algebra.DecomposerException
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException
      com.irurueta.geometry.InvalidRotationMatrixException
      com.irurueta.algebra.WrongSizeException
      com.irurueta.algebra.RankDeficientMatrixException
      com.irurueta.algebra.DecomposerException
    • testCompareKinematics

      @Test void testCompareKinematics() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException
      Checks that the ECEF, ECI and NED kinematics estimators agree for kinematically consistent pairs of frames (the position at the end of the time interval is the position at the start plus the mean velocity times the time interval, and ECI frames are obtained at the epochs of the start and the end of the time interval).
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
    • testNavigatorRoundTripWithRotation

      @Test void testNavigatorRoundTripWithRotation() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException, InertialNavigatorException
      Checks that the kinematics fed to ECEFInertialNavigator are recovered by the estimator from the navigated frame when the body rotates and gravity is evaluated at the position at the start of the interval.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
      InertialNavigatorException - never happens.
    • testFrameOverloadsUseOldPosition

      @Test void testFrameOverloadsUseOldPosition() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException, InertialNavigatorException
      Checks that every overload receiving both the current and the previous frame evaluates gravity at the position of the previous frame (start of the time interval), so that it recovers the kinematics fed to ECEFInertialNavigator.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
      InertialNavigatorException - never happens.
    • checkEstimate

      private static void checkEstimate(com.irurueta.statistics.UniformRandomizer randomizer, double timeIntervalSeconds, double maxAngleVariationDegrees) throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException
      Checks that all instance estimate overloads are consistent with each other for a randomly generated pair of frames.
      Parameters:
      randomizer - randomizer used to generate the frames.
      timeIntervalSeconds - time interval between frames expressed in seconds.
      maxAngleVariationDegrees - maximum absolute attitude variation per Euler angle between frames, expressed in degrees.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
    • checkEstimateAndReturnNew

      private static void checkEstimateAndReturnNew(com.irurueta.statistics.UniformRandomizer randomizer, double timeIntervalSeconds, double maxAngleVariationDegrees) throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException
      Checks that all instance estimateAndReturnNew overloads are consistent with each other for a randomly generated pair of frames.
      Parameters:
      randomizer - randomizer used to generate the frames.
      timeIntervalSeconds - time interval between frames expressed in seconds.
      maxAngleVariationDegrees - maximum absolute attitude variation per Euler angle between frames, expressed in degrees.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
    • checkEstimateKinematics

      private static void checkEstimateKinematics(com.irurueta.statistics.UniformRandomizer randomizer, double timeIntervalSeconds, double maxAngleVariationDegrees) throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException, com.irurueta.algebra.WrongSizeException, com.irurueta.algebra.RankDeficientMatrixException, com.irurueta.algebra.DecomposerException
      Checks that all static estimateKinematics overloads are consistent with each other and with the in-test reference implementation for a randomly generated pair of frames.
      Parameters:
      randomizer - randomizer used to generate the frames.
      timeIntervalSeconds - time interval between frames expressed in seconds.
      maxAngleVariationDegrees - maximum absolute attitude variation per Euler angle between frames, expressed in degrees.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
      com.irurueta.algebra.WrongSizeException - never happens.
      com.irurueta.algebra.RankDeficientMatrixException - never happens.
      com.irurueta.algebra.DecomposerException - never happens.
    • checkEstimateKinematicsAndReturnNew

      private static void checkEstimateKinematicsAndReturnNew(com.irurueta.statistics.UniformRandomizer randomizer, double timeIntervalSeconds, double maxAngleVariationDegrees) throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException, com.irurueta.algebra.WrongSizeException, com.irurueta.algebra.RankDeficientMatrixException, com.irurueta.algebra.DecomposerException
      Checks that all static estimateKinematicsAndReturnNew overloads are consistent with each other and with the in-test reference implementation for a randomly generated pair of frames.
      Parameters:
      randomizer - randomizer used to generate the frames.
      timeIntervalSeconds - time interval between frames expressed in seconds.
      maxAngleVariationDegrees - maximum absolute attitude variation per Euler angle between frames, expressed in degrees.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
      com.irurueta.algebra.WrongSizeException - never happens.
      com.irurueta.algebra.RankDeficientMatrixException - never happens.
      com.irurueta.algebra.DecomposerException - never happens.
    • createRandomizer

      private static com.irurueta.statistics.UniformRandomizer createRandomizer()
      Creates a randomizer with a fixed seed so that tests are deterministic.
      Returns:
      a seeded randomizer.
    • createOldNedFrame

      private static com.irurueta.navigation.frames.NEDFrame createOldNedFrame(com.irurueta.statistics.UniformRandomizer randomizer) throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException
      Creates a random NED frame at the start of the time interval.
      Parameters:
      randomizer - randomizer used to generate the frame.
      Returns:
      NED frame at the start of the time interval.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
    • createNewNedFrame

      private static com.irurueta.navigation.frames.NEDFrame createNewNedFrame(com.irurueta.navigation.frames.NEDFrame oldFrame, com.irurueta.statistics.UniformRandomizer randomizer, double maxAngleVariationDegrees) throws com.irurueta.geometry.InvalidRotationMatrixException, com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException
      Creates a random NED frame at the end of the time interval by randomly modifying the frame at the start.
      Parameters:
      oldFrame - NED frame at the start of the time interval.
      randomizer - randomizer used to generate the frame.
      maxAngleVariationDegrees - maximum absolute attitude variation per Euler angle, expressed in degrees.
      Returns:
      NED frame at the end of the time interval.
      Throws:
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
    • estimateKinematics

      private static BodyKinematics estimateKinematics(double timeInterval, com.irurueta.navigation.frames.CoordinateTransformation c, com.irurueta.navigation.frames.CoordinateTransformation oldC, double vx, double vy, double vz, double oldVx, double oldVy, double oldVz, double x, double y, double z) throws com.irurueta.algebra.WrongSizeException, com.irurueta.algebra.RankDeficientMatrixException, com.irurueta.algebra.DecomposerException
      Throws:
      com.irurueta.algebra.WrongSizeException
      com.irurueta.algebra.RankDeficientMatrixException
      com.irurueta.algebra.DecomposerException
    • createRoundTripOldFrame

      private static com.irurueta.navigation.frames.ECEFFrame createRoundTripOldFrame() throws com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException, com.irurueta.geometry.InvalidRotationMatrixException
      Creates the ECEF frame at the start of the interval used by the navigator round trip tests.
      Returns:
      ECEF frame at the start of the interval.
      Throws:
      com.irurueta.navigation.frames.InvalidSourceAndDestinationFrameTypeException - never happens.
      com.irurueta.geometry.InvalidRotationMatrixException - never happens.
    • createRoundTripKinematics

      private static BodyKinematics createRoundTripKinematics()
      Creates the body kinematics used by the navigator round trip tests.
      Returns:
      body kinematics applied during the interval.
    • specificForceDistance

      private static double specificForceDistance(BodyKinematics k1, BodyKinematics k2)
      Computes the Euclidean distance between the specific forces of two body kinematics.
      Parameters:
      k1 - first body kinematics.
      k2 - second body kinematics.
      Returns:
      distance between specific forces expressed in meters per squared second.
    • angularRateDistance

      private static double angularRateDistance(BodyKinematics k1, BodyKinematics k2)
      Computes the Euclidean distance between the angular rates of two body kinematics.
      Parameters:
      k1 - first body kinematics.
      k2 - second body kinematics.
      Returns:
      distance between angular rates expressed in radians per second.