Class ECEFVelocity

java.lang.Object
com.irurueta.navigation.frames.ECEFVelocity
All Implemented Interfaces:
Serializable, Cloneable

public class ECEFVelocity extends Object implements Serializable, Cloneable
Contains body velocity with respect Earth, resolved about ECEF frame and expressed in meters per second (m/s).
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Number of components.
    private double
    X coordinate of velocity of body frame expressed in meters per second (m/s) with respect ECEF frame, resolved along the corresponding frame axes.
    private double
    Y coordinate of velocity of body frame expressed in meters per second (m/s) with respect ECEF frame, resolved along the corresponding frame axes.
    private double
    Z coordinate of velocity of body frame expressed in meters per second (m/s) with respect ECEF frame, resolved along the corresponding frame axes.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
    ECEFVelocity(double vx, double vy, double vz)
    Constructor.
    Constructor.
    ECEFVelocity(com.irurueta.units.Speed vx, com.irurueta.units.Speed vy, com.irurueta.units.Speed vz)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Gets velocity coordinates expressed in meters per second (m/s) as an array.
    void
    asArray(double[] result)
    Gets velocity coordinates expressed in meters per second (m/s) as an array.
    com.irurueta.algebra.Matrix
    Gets velocity coordinates expressed in meters per second (m/s) as a column matrix.
    void
    asMatrix(com.irurueta.algebra.Matrix result)
    Gets velocity coordinates expressed in meters per second (m/s) as a column matrix.
    protected Object
    Makes a copy of this instance.
    private double
    convertSpeed(com.irurueta.units.Speed speed)
    Converts speed instance into meters per second value.
    void
    Copies data of provided instance into this instance.
    void
    Copies this instance data into provided instance.
    boolean
    Checks if provided instance has exactly the same contents as this instance.
    boolean
    equals(ECEFVelocity other, double threshold)
    Checks if provided instance has contents similar to this instance up to provided threshold value.
    boolean
    Checks if provided object is an ECEFVelocity having exactly the same contents as this instance.
    double
    Gets norm of velocity expressed in meters per second (m/s), which represents the speed of the body.
    com.irurueta.units.Speed
    Gets norm of velocity, which represents the speed of the body.
    void
    getNormAsSpeed(com.irurueta.units.Speed result)
    Gets norm of velocity, which represents the speed of the body.
    com.irurueta.units.Speed
    Gets x coordinate of velocity of body frame resolved along ECEF-frame axes.
    void
    getSpeedX(com.irurueta.units.Speed result)
    Gets cartesian x coordinate of velocity of body frame resolved along ECEF-frame axes.
    com.irurueta.units.Speed
    Gets y coordinate of velocity of body frame resolved along ECEF-frame axes.
    void
    getSpeedY(com.irurueta.units.Speed result)
    Gets cartesian y coordinate of velocity of body frame resolved along ECEF-frame axes.
    com.irurueta.units.Speed
    Gets z coordinate of velocity of body frame resolved along ECEF-frame axes.
    void
    getSpeedZ(com.irurueta.units.Speed result)
    Gets cartesian z coordinate of velocity of body frame resolved along ECEF-frame axes.
    double
    Gets x coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
    double
    Gets y coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
    double
    Gets z coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
    int
    Computes and returns hash code for this instance.
    void
    setCoordinates(double vx, double vy, double vz)
    Sets velocity coordinates of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
    void
    setCoordinates(com.irurueta.units.Speed vx, com.irurueta.units.Speed vy, com.irurueta.units.Speed vz)
    Sets cartesian coordinates of body velocity resolved along ECEF-frame axes.
    void
    setVx(double vx)
    Sets x coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
    void
    setVx(com.irurueta.units.Speed vx)
    Sets x coordinate of velocity of body frame resolved along ECEF-frame axes.
    void
    setVy(double vy)
    Sets y coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
    void
    setVy(com.irurueta.units.Speed vy)
    Sets y coordinate of velocity of body frame resolved along ECEF-frame axes.
    void
    setVz(double vz)
    Sets z coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
    void
    setVz(com.irurueta.units.Speed vz)
    Sets z coordinate of velocity of body frame resolved along ECEF-frame axes.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • COMPONENTS

      public static final int COMPONENTS
      Number of components.
      See Also:
    • vx

      private double vx
      X coordinate of velocity of body frame expressed in meters per second (m/s) with respect ECEF frame, resolved along the corresponding frame axes.
    • vy

      private double vy
      Y coordinate of velocity of body frame expressed in meters per second (m/s) with respect ECEF frame, resolved along the corresponding frame axes.
    • vz

      private double vz
      Z coordinate of velocity of body frame expressed in meters per second (m/s) with respect ECEF frame, resolved along the corresponding frame axes.
  • Constructor Details

    • ECEFVelocity

      public ECEFVelocity()
      Constructor.
    • ECEFVelocity

      public ECEFVelocity(double vx, double vy, double vz)
      Constructor.
      Parameters:
      vx - x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved along ECEF-frame axes.
      vy - y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved along ECEF-frame axes.
      vz - z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved along ECEF-frame axes.
    • ECEFVelocity

      public ECEFVelocity(com.irurueta.units.Speed vx, com.irurueta.units.Speed vy, com.irurueta.units.Speed vz)
      Constructor.
      Parameters:
      vx - x coordinate of velocity of body frame and resolved along ECEF-frame axes.
      vy - y coordinate of velocity of body frame and resolved along ECEF-frame axes.
      vz - z coordinate of velocity of body frame and resolved along ECEF-frame axes.
    • ECEFVelocity

      public ECEFVelocity(ECEFVelocity input)
      Constructor.
      Parameters:
      input - Body velocity to copy data from.
  • Method Details

    • getVx

      public double getVx()
      Gets x coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
      Returns:
      x coordinate of velocity.
    • setVx

      public void setVx(double vx)
      Sets x coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
      Parameters:
      vx - x coordinate of velocity.
    • getVy

      public double getVy()
      Gets y coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
      Returns:
      y coordinate of velocity.
    • setVy

      public void setVy(double vy)
      Sets y coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
      Parameters:
      vy - y coordinate of velocity.
    • getVz

      public double getVz()
      Gets z coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
      Returns:
      z coordinate of velocity.
    • setVz

      public void setVz(double vz)
      Sets z coordinate of velocity of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
      Parameters:
      vz - z coordinate of velocity.
    • setCoordinates

      public void setCoordinates(double vx, double vy, double vz)
      Sets velocity coordinates of body frame expressed in meters per second (m/s) resolved along ECEF-frame axes.
      Parameters:
      vx - x coordinate of velocity.
      vy - y coordinate of velocity.
      vz - z coordinate of velocity.
    • getSpeedX

      public void getSpeedX(com.irurueta.units.Speed result)
      Gets cartesian x coordinate of velocity of body frame resolved along ECEF-frame axes.
      Parameters:
      result - instance where cartesian x coordinate of velocity will be stored.
    • getSpeedX

      public com.irurueta.units.Speed getSpeedX()
      Gets x coordinate of velocity of body frame resolved along ECEF-frame axes.
      Returns:
      x coordinate of velocity of body frame resolved along ECEF-frame axes.
    • setVx

      public void setVx(com.irurueta.units.Speed vx)
      Sets x coordinate of velocity of body frame resolved along ECEF-frame axes.
      Parameters:
      vx - x coordinate of body velocity to be set.
    • getSpeedY

      public void getSpeedY(com.irurueta.units.Speed result)
      Gets cartesian y coordinate of velocity of body frame resolved along ECEF-frame axes.
      Parameters:
      result - instance where cartesian y coordinate of velocity will be stored.
    • getSpeedY

      public com.irurueta.units.Speed getSpeedY()
      Gets y coordinate of velocity of body frame resolved along ECEF-frame axes.
      Returns:
      y coordinate of velocity of body frame resolved along ECEF-frame axes.
    • setVy

      public void setVy(com.irurueta.units.Speed vy)
      Sets y coordinate of velocity of body frame resolved along ECEF-frame axes.
      Parameters:
      vy - y coordinate of body velocity to be set.
    • getSpeedZ

      public void getSpeedZ(com.irurueta.units.Speed result)
      Gets cartesian z coordinate of velocity of body frame resolved along ECEF-frame axes.
      Parameters:
      result - instance where cartesian z coordinate of velocity will be stored.
    • getSpeedZ

      public com.irurueta.units.Speed getSpeedZ()
      Gets z coordinate of velocity of body frame resolved along ECEF-frame axes.
      Returns:
      z coordinate of velocity of body frame resolved along ECEF-frame axes.
    • setVz

      public void setVz(com.irurueta.units.Speed vz)
      Sets z coordinate of velocity of body frame resolved along ECEF-frame axes.
      Parameters:
      vz - z coordinate of body velocity to be set.
    • setCoordinates

      public void setCoordinates(com.irurueta.units.Speed vx, com.irurueta.units.Speed vy, com.irurueta.units.Speed vz)
      Sets cartesian coordinates of body velocity resolved along ECEF-frame axes.
      Parameters:
      vx - x cartesian coordinate of body velocity.
      vy - y cartesian coordinate of body velocity.
      vz - z cartesian coordinate of body velocity.
    • getNorm

      public double getNorm()
      Gets norm of velocity expressed in meters per second (m/s), which represents the speed of the body.
      Returns:
      norm of velocity expressed in meters per second (m/s).
    • getNormAsSpeed

      public void getNormAsSpeed(com.irurueta.units.Speed result)
      Gets norm of velocity, which represents the speed of the body.
      Parameters:
      result - velocity norm.
    • getNormAsSpeed

      public com.irurueta.units.Speed getNormAsSpeed()
      Gets norm of velocity, which represents the speed of the body.
      Returns:
      velocity norm.
    • copyTo

      public void copyTo(ECEFVelocity output)
      Copies this instance data into provided instance.
      Parameters:
      output - destination instance where data will be copied to.
    • copyFrom

      public void copyFrom(ECEFVelocity input)
      Copies data of provided instance into this instance.
      Parameters:
      input - instance to copy data from.
    • asArray

      public void asArray(double[] result)
      Gets velocity coordinates expressed in meters per second (m/s) as an array.
      Parameters:
      result - array instance where velocity coordinates will be stored in x,y,z order.
      Throws:
      IllegalArgumentException - if provided array does not have length 3.
    • asArray

      public double[] asArray()
      Gets velocity coordinates expressed in meters per second (m/s) as an array.
      Returns:
      array containing velocity coordinates in x,y,z order.
    • asMatrix

      public void asMatrix(com.irurueta.algebra.Matrix result)
      Gets velocity coordinates expressed in meters per second (m/s) as a column matrix. If provided matrix does not have size 3x1, it will be resized.
      Parameters:
      result - matrix instance where velocity coordinates will be stored in x,y,z order.
    • asMatrix

      public com.irurueta.algebra.Matrix asMatrix()
      Gets velocity coordinates expressed in meters per second (m/s) as a column matrix.
      Returns:
      velocity coordinates stored in x,y,z order.
    • hashCode

      public int hashCode()
      Computes and returns hash code for this instance. Hash codes are almost unique values that are useful for fast classification and storage of objects in collections.
      Overrides:
      hashCode in class Object
      Returns:
      Hash code.
    • equals

      public boolean equals(Object o)
      Checks if provided object is an ECEFVelocity having exactly the same contents as this instance.
      Overrides:
      equals in class Object
      Parameters:
      o - Object to be compared.
      Returns:
      true if both objects are considered to be equal, false otherwise.
    • equals

      public boolean equals(ECEFVelocity other)
      Checks if provided instance has exactly the same contents as this instance.
      Parameters:
      other - instance to be compared.
      Returns:
      true if both instances are considered to be equal, false otherwise.
    • equals

      public boolean equals(ECEFVelocity other, double threshold)
      Checks if provided instance has contents similar to this instance up to provided threshold value.
      Parameters:
      other - instance to be compared.
      threshold - maximum difference allowed between velocity coordinates.
      Returns:
      true if both instances are considered to be equal (up to provided threshold), false otherwise.
    • clone

      protected Object clone() throws CloneNotSupportedException
      Makes a copy of this instance.
      Overrides:
      clone in class Object
      Returns:
      a copy of this instance.
      Throws:
      CloneNotSupportedException - if clone fails for some reason.
    • convertSpeed

      private double convertSpeed(com.irurueta.units.Speed speed)
      Converts speed instance into meters per second value.
      Parameters:
      speed - instance to be converted.
      Returns:
      converted value.