org.firstinspires.ftc.robotcore.external.navigation

## Class NavUtil

- java.lang.Object
- - org.firstinspires.ftc.robotcore.external.navigation.NavUtil

-     public class NavUtil
      extends java.lang.Object

  `NavUtil` is a collection of utilities that provide useful manipulations of objects related to navigation.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Velocity` | `integrate(Acceleration a, double dt)`
    `static Position` | `integrate(Velocity v, double dt)`
    `static Velocity` | `meanIntegrate(Acceleration cur, Acceleration prev)` Integrate between two accelerations to determine a change in velocity using an assumption that the mean of the accelerations has been acting the entire interval.
    `static Position` | `meanIntegrate(Velocity cur, Velocity prev)` Integrate between two velocities to determine a change in position using an assumption that the mean of the velocities has been acting the entire interval.
    `static Acceleration` | `minus(Acceleration a, Acceleration b)`
    `static Position` | `minus(Position a, Position b)`
    `static Velocity` | `minus(Velocity a, Velocity b)`
    `static Acceleration` | `plus(Acceleration a, Acceleration b)`
    `static Position` | `plus(Position a, Position b)`
    `static Velocity` | `plus(Velocity a, Velocity b)`
    `static Acceleration` | `scale(Acceleration a, double scale)`
    `static Position` | `scale(Position p, double scale)`
    `static Velocity` | `scale(Velocity v, double scale)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### plus

          public static Position plus(Position a,
                                      Position b)

    - #### plus

          public static Velocity plus(Velocity a,
                                      Velocity b)

    - #### plus

          public static Acceleration plus(Acceleration a,
                                          Acceleration b)

    - #### minus

          public static Position minus(Position a,
                                       Position b)

    - #### minus

          public static Velocity minus(Velocity a,
                                       Velocity b)

    - #### minus

          public static Acceleration minus(Acceleration a,
                                           Acceleration b)

    - #### scale

          public static Position scale(Position p,
                                       double scale)

    - #### scale

          public static Velocity scale(Velocity v,
                                       double scale)

    - #### scale

          public static Acceleration scale(Acceleration a,
                                           double scale)

    - #### integrate

          public static Position integrate(Velocity v,
                                           double dt)

    - #### integrate

          public static Velocity integrate(Acceleration a,
                                           double dt)

    - #### meanIntegrate

          public static Position meanIntegrate(Velocity cur,
                                               Velocity prev)

      Integrate between two velocities to determine a change in position using an assumption that the mean of the velocities has been acting the entire interval.
      Parameters:
        `cur` - the current velocity
        `prev` - the previous velocity
      Returns:
        an approximation to the change in position over the interval
      See Also:
        Simpson's Rule

    - #### meanIntegrate

          public static Velocity meanIntegrate(Acceleration cur,
                                               Acceleration prev)

      Integrate between two accelerations to determine a change in velocity using an assumption that the mean of the accelerations has been acting the entire interval.
      Parameters:
        `cur` - the current acceleration
        `prev` - the previous acceleration
      Returns:
        an approximation to the change in velocity over the interval
      See Also:
        Simpson's Rule