Package com.irurueta.navigation.inertial
Class NEDGravity
java.lang.Object
com.irurueta.navigation.inertial.NEDGravity
- All Implemented Interfaces:
Serializable
,Cloneable
Contains acceleration due to gravity resolved about NED frame.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Number of components.private double
Acceleration due to gravity through down-axis of NED frame and expressed in meters per squared second (m/s^2).private double
Acceleration due to gravity through north-axis of NED frame and expressed in meters per squared second (m/s^2).static final double
Acceleration due to gravity through east-axis of NED frame expressed in meters per squared second (m/s^2).private static final long
Serialization version. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.NEDGravity
(double gn, double gd) Constructor.NEDGravity
(NEDGravity input) Constructor.NEDGravity
(com.irurueta.units.Acceleration gn, com.irurueta.units.Acceleration gd) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
asArray()
Gets gravity coordinates as an array.void
asArray
(double[] result) Gets gravity coordinates as an array.com.irurueta.algebra.Matrix
asMatrix()
Gets gravity coordinates as a column matrix.void
asMatrix
(com.irurueta.algebra.Matrix result) Gets gravity coordinates as a column matrix.protected Object
clone()
Makes a copy of this instance.void
copyFrom
(NEDGravity input) Copies data of provided instance into this instance.void
copyTo
(NEDGravity output) Copies this instance data into provided instance.boolean
equals
(NEDGravity other) Checks if provided instance has exactly the same contents as this instance.boolean
equals
(NEDGravity other, double threshold) Checks if provided instance has contents similar to this instance up to provided threshold value.boolean
Check if provided object is a GravityNED instance having exactly the same contents as this instance.double
getGd()
Gets acceleration due to gravity through down-axis of NED frame expressed in meters per squared second (m/s^2).com.irurueta.units.Acceleration
Gets acceleration due to gravity through down-axis of NED frame expressed in meters per squared second (m/s^2).void
getGdAsAcceleration
(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through down-axis of NED frame expressed in meters per squared second (m/s^2).double
getGe()
Gets acceleration due to gravity through east-axis of NED frame expressed in meters per squared second (m/s^2).com.irurueta.units.Acceleration
Gets acceleration due to gravity through east-axis of NED frame expressed in meters per squared second (m/s^2).void
getGeAsAcceleration
(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through east-axis of NED frame expressed in meters per squared second (m/s^2).double
getGn()
Gets acceleration due to gravity through north-axis of NED frame expressed in meters per squared second (m/s^2).com.irurueta.units.Acceleration
Gets acceleration due to gravity through north-axis of NED frame expressed in meters per squared second (m/s^2).void
getGnAsAcceleration
(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through north-axis of NED frame expressed in meters per squared second (m/s^2).double
getNorm()
Gets gravity norm.com.irurueta.units.Acceleration
Gets gravity norm as an acceleration.void
getNormAsAcceleration
(com.irurueta.units.Acceleration result) Gets gravity norm as an acceleration.int
hashCode()
Computes and returns hash code for this instance.void
setCoordinates
(double gn, double gd) Sets gravity coordinates resolved about NED frame and expressed in meters per squared second (m/s^2).void
setCoordinates
(com.irurueta.units.Acceleration gravityN, com.irurueta.units.Acceleration gravityD) Sets gravity coordinates.void
setGd
(double gd) Sets acceleration due to gravity through down-axis of NED frame expressed in meters per squared second (m/s^2).void
setGd
(com.irurueta.units.Acceleration gravityD) Sets acceleration due to gravity through down-axis of NED frame.void
setGn
(double gn) Sets acceleration due to gravity through north-axis of NED frame expressed in meters per squared second (m/s^2).void
setGn
(com.irurueta.units.Acceleration gravityN) Sets acceleration due to gravity through north-axis of NED frame.
-
Field Details
-
GRAVITY_EAST
public static final double GRAVITY_EASTAcceleration due to gravity through east-axis of NED frame expressed in meters per squared second (m/s^2).- See Also:
-
COMPONENTS
public static final int COMPONENTSNumber of components.- See Also:
-
serialVersionUID
private static final long serialVersionUIDSerialization version. This is used to ensure compatibility of deserialization of permanently stored serialized instances.- See Also:
-
gn
private double gnAcceleration due to gravity through north-axis of NED frame and expressed in meters per squared second (m/s^2). -
gd
private double gdAcceleration due to gravity through down-axis of NED frame and expressed in meters per squared second (m/s^2).
-
-
Constructor Details
-
NEDGravity
public NEDGravity()Constructor. -
NEDGravity
public NEDGravity(double gn, double gd) Constructor.- Parameters:
gn
- acceleration due to gravity through north-axis of NED frame and expressed in meters per squared second (m/s^2).gd
- acceleration due to gravity through down-axis of NED frame and expressed in meters per squared second (m/s^2).
-
NEDGravity
public NEDGravity(com.irurueta.units.Acceleration gn, com.irurueta.units.Acceleration gd) Constructor.- Parameters:
gn
- acceleration due to gravity through north-axis of NED frame.gd
- acceleration due to gravity through down-axis of NED frame.
-
-
Method Details
-
getGn
public double getGn()Gets acceleration due to gravity through north-axis of NED frame expressed in meters per squared second (m/s^2).- Returns:
- acceleration due to gravity through north-axis of NED frame expressed in meters per squared second (m/s^2).
-
setGn
public void setGn(double gn) Sets acceleration due to gravity through north-axis of NED frame expressed in meters per squared second (m/s^2).- Parameters:
gn
- acceleration due to gravity through north-axis of NED frame expressed in meters per squared second (m/s^2).
-
getGe
public double getGe()Gets acceleration due to gravity through east-axis of NED frame expressed in meters per squared second (m/s^2).- Returns:
- acceleration due to gravity through east-axis of NED frame expressed in meters per squared second (m/s^2).
-
getGd
public double getGd()Gets acceleration due to gravity through down-axis of NED frame expressed in meters per squared second (m/s^2).- Returns:
- acceleration due to gravity through down-axis of NED frame expressed in meters per squared second (m/s^2).
-
setGd
public void setGd(double gd) Sets acceleration due to gravity through down-axis of NED frame expressed in meters per squared second (m/s^2).- Parameters:
gd
- acceleration due to gravity through down-axis of NED frame expressed in meters per squared second (m/s^2).
-
setCoordinates
public void setCoordinates(double gn, double gd) Sets gravity coordinates resolved about NED frame and expressed in meters per squared second (m/s^2).- Parameters:
gn
- acceleration due to gravity through north-axis of NED frame.gd
- acceleration due to gravity through down-axis of NED frame.
-
getGnAsAcceleration
public void getGnAsAcceleration(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through north-axis of NED frame expressed in meters per squared second (m/s^2).- Parameters:
result
- instance where acceleration due to gravity through NED north-axis will be stored.
-
getGnAsAcceleration
public com.irurueta.units.Acceleration getGnAsAcceleration()Gets acceleration due to gravity through north-axis of NED frame expressed in meters per squared second (m/s^2).- Returns:
- acceleration due to gravity through NED north-axis.
-
setGn
public void setGn(com.irurueta.units.Acceleration gravityN) Sets acceleration due to gravity through north-axis of NED frame.- Parameters:
gravityN
- acceleration due to gravity through NED north-axis.
-
getGeAsAcceleration
public void getGeAsAcceleration(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through east-axis of NED frame expressed in meters per squared second (m/s^2).- Parameters:
result
- instance where acceleration due to gravity through NED east-axis will be stored.
-
getGeAsAcceleration
public com.irurueta.units.Acceleration getGeAsAcceleration()Gets acceleration due to gravity through east-axis of NED frame expressed in meters per squared second (m/s^2).- Returns:
- acceleration due to gravity through NED east-axis.
-
getGdAsAcceleration
public void getGdAsAcceleration(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through down-axis of NED frame expressed in meters per squared second (m/s^2).- Parameters:
result
- instance where acceleration due to gravity through NED down-axis will be stored.
-
getGdAsAcceleration
public com.irurueta.units.Acceleration getGdAsAcceleration()Gets acceleration due to gravity through down-axis of NED frame expressed in meters per squared second (m/s^2).- Returns:
- acceleration due to gravity through NED down-axis.
-
setGd
public void setGd(com.irurueta.units.Acceleration gravityD) Sets acceleration due to gravity through down-axis of NED frame.- Parameters:
gravityD
- acceleration due to gravity through NED down-axis.
-
setCoordinates
public void setCoordinates(com.irurueta.units.Acceleration gravityN, com.irurueta.units.Acceleration gravityD) Sets gravity coordinates.- Parameters:
gravityN
- acceleration due to gravity through north-axis of NED frame.gravityD
- acceleration due to gravity through down-axis of NED frame.
-
getNorm
public double getNorm()Gets gravity norm.- Returns:
- gravity norm.
-
getNormAsAcceleration
public void getNormAsAcceleration(com.irurueta.units.Acceleration result) Gets gravity norm as an acceleration.- Parameters:
result
- instance where result will be stored.
-
getNormAsAcceleration
public com.irurueta.units.Acceleration getNormAsAcceleration()Gets gravity norm as an acceleration.- Returns:
- an acceleration containing gravity norm.
-
asArray
public void asArray(double[] result) Gets gravity coordinates as an array.- Parameters:
result
- array instance where gravity coordinates will be stored in n,e,d order.- Throws:
IllegalArgumentException
- if provided array does not have length 3.
-
asArray
public double[] asArray()Gets gravity coordinates as an array.- Returns:
- array containing gravity coordinates in n,e,d order.
-
asMatrix
public void asMatrix(com.irurueta.algebra.Matrix result) Gets gravity coordinates 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 n,e,d order.
-
asMatrix
public com.irurueta.algebra.Matrix asMatrix()Gets gravity coordinates as a column matrix.- Returns:
- a matrix containing gravity coordinates stored in n,e,d 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
Check if provided object is a GravityNED instance 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.
-