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 int
Number of components.private double
Cartesian x coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.private double
Cartesian y coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.private double
Cartesian 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.void
asArray
(double[] result) Gets position coordinates expressed in meters (m) as an array.com.irurueta.algebra.Matrix
asMatrix()
Gets position coordinates expressed in meters (m) as a column matrix.void
asMatrix
(com.irurueta.algebra.Matrix result) Gets position coordinates expressed in meters (m) as a column matrix.protected Object
clone()
Makes a copy of this instance.private double
convertDistance
(com.irurueta.units.Distance distance) Converts distance instance into meters value.void
copyFrom
(ECEFPosition input) Copies data of provided instance into this instance.void
copyTo
(ECEFPosition output) Copies this instance data into provided instance.boolean
equals
(ECEFPosition other) Checks if provided instance has exactly the same contents as this instance.boolean
equals
(ECEFPosition 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 ECEFPosition having exactly the same contents as this instance.com.irurueta.units.Distance
Gets cartesian x coordinate of body position resolved along ECEF-frame axes.void
getDistanceX
(com.irurueta.units.Distance result) Gets cartesian x coordinate of body position resolved along ECEF-frame axes.com.irurueta.units.Distance
Gets cartesian y coordinate of body position resolved along ECEF-frame axes.void
getDistanceY
(com.irurueta.units.Distance result) Gets cartesian y coordinate of body position resolved along ECEF-frame axes.com.irurueta.units.Distance
Gets cartesian z coordinate of body position resolved along ECEF-frame axes.void
getDistanceZ
(com.irurueta.units.Distance result) Gets cartesian z coordinate of body position resolved along ECEF-frame axes.double
getNorm()
Gets norm of position expressed in meters (m), which represents the distance to Earth's center of mass.com.irurueta.units.Distance
Gets norm of position, which represents the distance to Earth's center of mass.void
getNormAsDistance
(com.irurueta.units.Distance result) Gets norm of position, which represents the distance to Earth's center of mass.com.irurueta.geometry.Point3D
Gets body position expressed in meters (m) and resolved along ECEF-frame axes.void
getPosition
(com.irurueta.geometry.Point3D result) Gets body position expressed in meters (m) and resolved along ECEF-frame axes.double
getX()
Gets cartesian x coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.double
getY()
Gets cartesian y coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.double
getZ()
Gets cartesian z coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.int
hashCode()
Computes and returns hash code for this instance.void
setCoordinates
(double x, double y, double z) Sets cartesian coordinates of body position expressed in meters (m) and resolved along ECEF-frame axes.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.void
setPosition
(com.irurueta.geometry.Point3D point) Sets body position expressed in meters (m) and resolved along ECEF-frame axes.void
setX
(double x) Sets cartesian x coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.void
setX
(com.irurueta.units.Distance x) Sets cartesian x coordinate of body position resolved along ECEF-frame axes.void
setY
(double y) Sets cartesian y coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.void
setY
(com.irurueta.units.Distance y) Sets cartesian y coordinate of body position resolved along ECEF-frame axes.void
setZ
(double z) Sets cartesian z coordinate of body position expressed in meters (m) with respect ECEF frame, resolved along ECEF axes.void
setZ
(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:
clone
in 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.
-