Package com.irurueta.navigation.frames
Class ECEFPosition
java.lang.Object
com.irurueta.navigation.frames.ECEFPosition
- All Implemented Interfaces:
Serializable,Cloneable
Contains body cartesian position with respect Earth, resolved about ECEF frame
and expressed in meters (m).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNumber of components.private doubleCartesian x coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.private doubleCartesian y coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.private doubleCartesian z coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.ECEFPosition(double x, double y, double z) Constructor.ECEFPosition(ECEFPosition input) Constructor.ECEFPosition(com.irurueta.units.Distance x, com.irurueta.units.Distance y, com.irurueta.units.Distance z) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]asArray()Gets position coordinates expressed in meters (m) as an array.voidasArray(double[] result) Gets position coordinates expressed in meters (m) as an array.com.irurueta.algebra.MatrixasMatrix()Gets position coordinates expressed in meters (m) as a column matrix.voidasMatrix(com.irurueta.algebra.Matrix result) Gets position coordinates expressed in meters (m) as a column matrix.protected Objectclone()Makes a copy of this instance.private doubleconvertDistance(com.irurueta.units.Distance distance) Converts distance instance into meters value.voidcopyFrom(ECEFPosition input) Copies data of provided instance into this instance.voidcopyTo(ECEFPosition output) Copies this instance data into provided instance.booleanequals(ECEFPosition other) Checks if provided instance has exactly the same contents as this instance.booleanequals(ECEFPosition other, double threshold) Checks if provided instance has contents similar to this instance up to provided threshold value.booleanChecks if provided object is an ECEFPosition having exactly the same contents as this instance.com.irurueta.units.DistanceGets cartesian x coordinate of body position resolved along ECEF-frame axes.voidgetDistanceX(com.irurueta.units.Distance result) Gets cartesian x coordinate of body position resolved along ECEF-frame axes.com.irurueta.units.DistanceGets cartesian y coordinate of body position resolved along ECEF-frame axes.voidgetDistanceY(com.irurueta.units.Distance result) Gets cartesian y coordinate of body position resolved along ECEF-frame axes.com.irurueta.units.DistanceGets cartesian z coordinate of body position resolved along ECEF-frame axes.voidgetDistanceZ(com.irurueta.units.Distance result) Gets cartesian z coordinate of body position resolved along ECEF-frame axes.doublegetNorm()Gets norm of position expressed in meters (m), which represents the distance to Earth's center of mass.com.irurueta.units.DistanceGets norm of position, which represents the distance to Earth's center of mass.voidgetNormAsDistance(com.irurueta.units.Distance result) Gets norm of position, which represents the distance to Earth's center of mass.com.irurueta.geometry.Point3DGets body position expressed in meters (m) and resolved along ECEF-frame axes.voidgetPosition(com.irurueta.geometry.Point3D result) Gets body position expressed in meters (m) and resolved along ECEF-frame axes.doublegetX()Gets cartesian x coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.doublegetY()Gets cartesian y coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.doublegetZ()Gets cartesian z coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.inthashCode()Computes and returns hash code for this instance.voidsetCoordinates(double x, double y, double z) Sets cartesian coordinates of body position expressed in meters (m) and resolved along ECEF-frame axes.voidsetCoordinates(com.irurueta.units.Distance x, com.irurueta.units.Distance y, com.irurueta.units.Distance z) Sets cartesian coordinates of body position and resolved along ECEF-frame axes.voidsetPosition(com.irurueta.geometry.Point3D point) Sets body position expressed in meters (m) and resolved along ECEF-frame axes.voidsetX(double x) Sets cartesian x coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.voidsetX(com.irurueta.units.Distance x) Sets cartesian x coordinate of body position resolved along ECEF-frame axes.voidsetY(double y) Sets cartesian y coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.voidsetY(com.irurueta.units.Distance y) Sets cartesian y coordinate of body position resolved along ECEF-frame axes.voidsetZ(double z) Sets cartesian z coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.voidsetZ(com.irurueta.units.Distance z) Sets cartesian z coordinate of body position resolved along ECEF-frame axes.
-
Field Details
-
COMPONENTS
public static final int COMPONENTSNumber of components.- See Also:
-
x
private double xCartesian x coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes. -
y
private double yCartesian y coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes. -
z
private double zCartesian z coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.
-
-
Constructor Details
-
ECEFPosition
public ECEFPosition()Constructor. -
ECEFPosition
public ECEFPosition(double x, double y, double z) Constructor.- Parameters:
x- cartesian x coordinate of body position expressed in meters (m) and resolved along ECEF-frame axes.y- cartesian y coordinate of body position expressed in meters (m) and resolved along ECEF-frame axes.z- cartesian z coordinate of body position expressed in meters (m) and resolved along ECEF-frame axes.
-
ECEFPosition
public ECEFPosition(com.irurueta.units.Distance x, com.irurueta.units.Distance y, com.irurueta.units.Distance z) Constructor.- Parameters:
x- cartesian x coordinate of body position resolved along ECEF-frame axes.y- cartesian y coordinate of body position resolved along ECEF-frame axes.z- cartesian z coordinate of body position resolved along ECEF-frame axes.
-
-
Method Details
-
getX
public double getX()Gets cartesian x coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.- Returns:
- cartesian x coordinate of body position.
-
setX
public void setX(double x) Sets cartesian x coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.- Parameters:
x- cartesian x coordinate of body position.
-
getY
public double getY()Gets cartesian y coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.- Returns:
- cartesian y coordinate of body position.
-
setY
public void setY(double y) Sets cartesian y coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.- Parameters:
y- cartesian y coordinate of body position.
-
getZ
public double getZ()Gets cartesian z coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.- Returns:
- z coordinate of body position.
-
setZ
public void setZ(double z) Sets cartesian z coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.- Parameters:
z- cartesian z coordinate of body position.
-
setCoordinates
public void setCoordinates(double x, double y, double z) Sets cartesian coordinates of body position expressed in meters (m) and resolved along ECEF-frame axes.- Parameters:
x- cartesian x coordinate of body position.y- cartesian y coordinate of body position.z- cartesian z coordinate of body position.
-
getPosition
public com.irurueta.geometry.Point3D getPosition()Gets body position expressed in meters (m) and resolved along ECEF-frame axes.- Returns:
- body position.
-
getPosition
public void getPosition(com.irurueta.geometry.Point3D result) Gets body position expressed in meters (m) and resolved along ECEF-frame axes.- Parameters:
result- instance where position data is copied to.
-
setPosition
public void setPosition(com.irurueta.geometry.Point3D point) Sets body position expressed in meters (m) and resolved along ECEF-frame axes.- Parameters:
point- body position to be set.
-
getDistanceX
public void getDistanceX(com.irurueta.units.Distance result) Gets cartesian x coordinate of body position resolved along ECEF-frame axes.- Parameters:
result- instance where cartesian x coordinate of body position will be stored.
-
getDistanceX
public com.irurueta.units.Distance getDistanceX()Gets cartesian x coordinate of body position resolved along ECEF-frame axes.- Returns:
- x coordinate of body position resolved along ECEF-frame axes.
-
setX
public void setX(com.irurueta.units.Distance x) Sets cartesian x coordinate of body position resolved along ECEF-frame axes.- Parameters:
x- cartesian x coordinate of body position to be set.
-
getDistanceY
public void getDistanceY(com.irurueta.units.Distance result) Gets cartesian y coordinate of body position resolved along ECEF-frame axes.- Parameters:
result- instance where cartesian y coordinate of body position will be stored.
-
getDistanceY
public com.irurueta.units.Distance getDistanceY()Gets cartesian y coordinate of body position resolved along ECEF-frame axes.- Returns:
- y coordinate of body position resolved along ECEF-frame axes.
-
setY
public void setY(com.irurueta.units.Distance y) Sets cartesian y coordinate of body position resolved along ECEF-frame axes.- Parameters:
y- cartesian y coordinate of body position to be set.
-
getDistanceZ
public void getDistanceZ(com.irurueta.units.Distance result) Gets cartesian z coordinate of body position resolved along ECEF-frame axes.- Parameters:
result- instance where cartesian z coordinate of body position will be stored.
-
getDistanceZ
public com.irurueta.units.Distance getDistanceZ()Gets cartesian z coordinate of body position resolved along ECEF-frame axes.- Returns:
- z coordinate of body position resolved along ECEF-frame axes.
-
setZ
public void setZ(com.irurueta.units.Distance z) Sets cartesian z coordinate of body position resolved along ECEF-frame axes.- Parameters:
z- cartesian z coordinate of body position to be set.
-
setCoordinates
public void setCoordinates(com.irurueta.units.Distance x, com.irurueta.units.Distance y, com.irurueta.units.Distance z) Sets cartesian coordinates of body position and resolved along ECEF-frame axes.- Parameters:
x- cartesian x coordinate of body position.y- cartesian y coordinate of body position.z- cartesian z coordinate of body position.
-
getNorm
public double getNorm()Gets norm of position expressed in meters (m), which represents the distance to Earth's center of mass.- Returns:
- position norm expressed in meters (m).
-
getNormAsDistance
public void getNormAsDistance(com.irurueta.units.Distance result) Gets norm of position, which represents the distance to Earth's center of mass.- Parameters:
result- instance where result will be stored.
-
getNormAsDistance
public com.irurueta.units.Distance getNormAsDistance()Gets norm of position, which represents the distance to Earth's center of mass.- Returns:
- position norm.
-
asArray
public void asArray(double[] result) Gets position coordinates expressed in meters (m) as an array.- Parameters:
result- array instance where position coordinates will be stored in x,y,z order.- Throws:
IllegalArgumentException- if provided array does not have length 3.
-
asArray
public double[] asArray()Gets position coordinates expressed in meters (m) as an array.- Returns:
- array containing position coordinates in x,y,z order.
-
asMatrix
public void asMatrix(com.irurueta.algebra.Matrix result) Gets position coordinates expressed in meters (m) as a column matrix. If provided matrix does not have size 3x1, it will be resized.- Parameters:
result- matrix instance where gravity coordinates will be stored in x,y,z order.
-
asMatrix
public com.irurueta.algebra.Matrix asMatrix()Gets position coordinates expressed in meters (m) as a column matrix.- Returns:
- position 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. -
equals
Checks if provided object is an ECEFPosition having exactly the same contents as this instance. -
clone
Makes a copy of this instance.- Overrides:
clonein classObject- Returns:
- a copy of this instance.
- Throws:
CloneNotSupportedException- if clone fails for some reason.
-
convertDistance
private double convertDistance(com.irurueta.units.Distance distance) Converts distance instance into meters value.- Parameters:
distance- instance to be converted.- Returns:
- converted value.
-