Package com.irurueta.navigation.inertial
Class GravityOrGravitation<T extends GravityOrGravitation<?>>
java.lang.Object
com.irurueta.navigation.inertial.GravityOrGravitation<T>
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
ECEFGravity
,ECIGravitation
public abstract class GravityOrGravitation<T extends GravityOrGravitation<?>>
extends Object
implements Serializable, Cloneable
Contains acceleration due to gravity resolved about ECEF or ECI frame, depending
on the implementation.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Number of components.(package private) double
Acceleration due to gravity through ECI or ECEF x-axis expressed in meters per squared second (m/s^2).(package private) double
Acceleration due to gravity through ECI or ECEF y-axis expressed in meters per squared second (m/s^2).(package private) double
Acceleration due to gravity through ECI or ECEF z-axis expressed in meters per squared second (m/s^2). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor.protected
GravityOrGravitation
(double gx, double gy, double gz) Constructor.protected
GravityOrGravitation
(com.irurueta.units.Acceleration gx, com.irurueta.units.Acceleration gy, com.irurueta.units.Acceleration gz) Constructor.protected
GravityOrGravitation
(T input) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
asArray()
Gets gravity coordinates expressed in meters per squared second (m/s^2) as an array.void
asArray
(double[] result) Gets gravity coordinates expressed in meters per squared second (m/s^2) 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 expressed in meters per squared second (m/s^2) as a column matrix.void
Copies data of provided instance into this instance.void
Copies this instance data into provided instance.abstract boolean
Check if provided object is a T instance having exactly the same contents as this instance.boolean
Checks if provided instance has exactly the same contents as this instance.boolean
Checks if provided instance has contents similar to this instance up to provided threshold value.double
getGx()
Gets acceleration due to gravity through ECI or ECEF x-axis expressed in meters per squared second (m/s^2).com.irurueta.units.Acceleration
Gets acceleration due to gravity through ECI or ECEF x-axis.void
getGxAsAcceleration
(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through ECI or ECEF x-axis.double
getGy()
Gets acceleration due to gravity through ECI or ECEF y-axis expressed in meters per squared second (m/s^2).com.irurueta.units.Acceleration
Gets acceleration due to gravity through ECI or ECEF y-axis.void
getGyAsAcceleration
(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through ECI or ECEF y-axis.double
getGz()
Gets acceleration due to gravity through ECI or ECEF z-axis expressed in meters per squared second (m/s^2).com.irurueta.units.Acceleration
Gets acceleration due to gravity through ECI or ECEF z-axis.void
getGzAsAcceleration
(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through ECI or ECEF z-axis.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 gx, double gy, double gz) Sets gravity coordinates resolved about ECI or ECEF frame and expressed in meters per squared second (m/s^2).void
setCoordinates
(com.irurueta.units.Acceleration gravityX, com.irurueta.units.Acceleration gravityY, com.irurueta.units.Acceleration gravityZ) Sets gravity coordinates.void
setGx
(double gx) Sets acceleration due to gravity through ECI or ECEF x-axis expressed in meters per squared second (m/s^2).void
setGx
(com.irurueta.units.Acceleration gravityX) Sets acceleration due to gravity through ECI or ECEF x-axis.void
setGy
(double gy) Sets acceleration due to gravity through ECI or ECEF y-axis expressed in meters per squared second (m/s^2).void
setGy
(com.irurueta.units.Acceleration gravityY) Sets acceleration due to gravity through ECI or ECEF y-axis.void
setGz
(double gz) Sets acceleration due to gravity through ECI or ECEF z-axis expressed in meters per squared second (m/s^2).void
setGz
(com.irurueta.units.Acceleration gravityZ) Sets acceleration due to gravity through ECI or ECEF z-axis.
-
Field Details
-
COMPONENTS
public static final int COMPONENTSNumber of components.- See Also:
-
gx
double gxAcceleration due to gravity through ECI or ECEF x-axis expressed in meters per squared second (m/s^2). -
gy
double gyAcceleration due to gravity through ECI or ECEF y-axis expressed in meters per squared second (m/s^2). -
gz
double gzAcceleration due to gravity through ECI or ECEF z-axis expressed in meters per squared second (m/s^2).
-
-
Constructor Details
-
GravityOrGravitation
protected GravityOrGravitation()Constructor. -
GravityOrGravitation
protected GravityOrGravitation(double gx, double gy, double gz) Constructor.- Parameters:
gx
- acceleration due to gravity through ECI or ECEF x-axis expressed in meters per squared second (m/s^2).gy
- acceleration due to gravity through ECI or ECEF y-axis expressed in meters per squared second (m/s^2).gz
- acceleration due to gravity through ECI or ECEF z-axis expressed in meters per squared second (m/s^2).
-
GravityOrGravitation
protected GravityOrGravitation(com.irurueta.units.Acceleration gx, com.irurueta.units.Acceleration gy, com.irurueta.units.Acceleration gz) Constructor.- Parameters:
gx
- acceleration due to gravity through ECI or ECEF x-axis to be set.gy
- acceleration due to gravity through ECI or ECEF y-axis to be set.gz
- acceleration due to gravity through ECI or ECEF z-axis to be set.
-
GravityOrGravitation
Constructor.- Parameters:
input
- instance to copy data from.
-
-
Method Details
-
getGx
public double getGx()Gets acceleration due to gravity through ECI or ECEF x-axis expressed in meters per squared second (m/s^2).- Returns:
- acceleration due to gravity through ECI or ECEF x-axis.
-
setGx
public void setGx(double gx) Sets acceleration due to gravity through ECI or ECEF x-axis expressed in meters per squared second (m/s^2).- Parameters:
gx
- acceleration due to gravity through ECI or ECEF x-axis.
-
getGy
public double getGy()Gets acceleration due to gravity through ECI or ECEF y-axis expressed in meters per squared second (m/s^2).- Returns:
- acceleration due to gravity through ECI or ECEF y-axis.
-
setGy
public void setGy(double gy) Sets acceleration due to gravity through ECI or ECEF y-axis expressed in meters per squared second (m/s^2).- Parameters:
gy
- acceleration due to gravity through ECI or ECEF y-axis.
-
getGz
public double getGz()Gets acceleration due to gravity through ECI or ECEF z-axis expressed in meters per squared second (m/s^2).- Returns:
- acceleration due to gravity through ECI or ECEF z-axis.
-
setGz
public void setGz(double gz) Sets acceleration due to gravity through ECI or ECEF z-axis expressed in meters per squared second (m/s^2).- Parameters:
gz
- acceleration due to gravity through ECI or ECEF z-axis.
-
setCoordinates
public void setCoordinates(double gx, double gy, double gz) Sets gravity coordinates resolved about ECI or ECEF frame and expressed in meters per squared second (m/s^2).- Parameters:
gx
- acceleration due to gravity through ECI or ECEF x-axis expressed in meters per squared second (m/s^2).gy
- acceleration due to gravity through ECI or ECEF y-axis expressed in meters per squared second (m/s^2).gz
- acceleration due to gravity through ECI or ECEF z-axis expressed in meters per squared second (m/s^2).
-
getGxAsAcceleration
public void getGxAsAcceleration(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through ECI or ECEF x-axis.- Parameters:
result
- instance where acceleration due to gravity through ECI or ECEF x-axis will be stored.
-
getGxAsAcceleration
public com.irurueta.units.Acceleration getGxAsAcceleration()Gets acceleration due to gravity through ECI or ECEF x-axis.- Returns:
- acceleration due to gravity through ECI or ECEF x-axis.
-
setGx
public void setGx(com.irurueta.units.Acceleration gravityX) Sets acceleration due to gravity through ECI or ECEF x-axis.- Parameters:
gravityX
- acceleration due to gravity through ECI or ECEF x-axis to be set.
-
getGyAsAcceleration
public void getGyAsAcceleration(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through ECI or ECEF y-axis.- Parameters:
result
- instance where acceleration due to gravity through ECI or ECEF y-axis will be stored.
-
getGyAsAcceleration
public com.irurueta.units.Acceleration getGyAsAcceleration()Gets acceleration due to gravity through ECI or ECEF y-axis.- Returns:
- acceleration due to gravity through ECI or ECEF y-axis.
-
setGy
public void setGy(com.irurueta.units.Acceleration gravityY) Sets acceleration due to gravity through ECI or ECEF y-axis.- Parameters:
gravityY
- acceleration due to gravity through ECI or ECEF y-axis to be set.
-
getGzAsAcceleration
public void getGzAsAcceleration(com.irurueta.units.Acceleration result) Gets acceleration due to gravity through ECI or ECEF z-axis.- Parameters:
result
- instance where acceleration due to gravity through ECI or ECEF z-axis will be stored.
-
getGzAsAcceleration
public com.irurueta.units.Acceleration getGzAsAcceleration()Gets acceleration due to gravity through ECI or ECEF z-axis.- Returns:
- acceleration due to gravity through ECI or ECEF z-axis.
-
setGz
public void setGz(com.irurueta.units.Acceleration gravityZ) Sets acceleration due to gravity through ECI or ECEF z-axis.- Parameters:
gravityZ
- acceleration due to gravity through ECI or ECEF z-axis to be set.
-
setCoordinates
public void setCoordinates(com.irurueta.units.Acceleration gravityX, com.irurueta.units.Acceleration gravityY, com.irurueta.units.Acceleration gravityZ) Sets gravity coordinates.- Parameters:
gravityX
- acceleration due to gravity through ECI or ECEF x-axis to be set.gravityY
- acceleration due to gravity through ECI or ECEF y-axis to be set.gravityZ
- acceleration due to gravity through ECI or ECEF z-axis to be set.
-
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.
-
copyTo
Copies this instance data into provided instance.- Parameters:
output
- destination instance where data will be copied to.
-
copyFrom
Copies data of provided instance into this instance.- Parameters:
input
- instance to copy data from.
-
asArray
public void asArray(double[] result) Gets gravity coordinates expressed in meters per squared second (m/s^2) as an array.- Parameters:
result
- array instance where gravity coordinates will be stored in x,y,z order.- Throws:
IllegalArgumentException
- if provided array does not have length 3.
-
asArray
public double[] asArray()Gets gravity coordinates expressed in meters per squared second (m/s^2) as an array.- Returns:
- array containing gravity coordinates in x,y,z order.
-
asMatrix
public void asMatrix(com.irurueta.algebra.Matrix result) Gets gravity coordinates expressed in meters per squared second (m/s^2) 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 gravity coordinates as a column matrix.- Returns:
- a matrix containing gravity 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
Check if provided object is a T instance having exactly the same contents as this instance. -
equals
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
Checks if provided instance has contents similar to this instance up to provided threshold value.- Parameters:
other
- instance to be compared.threshold
- maximum allowed difference between gravity coordinates.- Returns:
- true if both instances are considered to be equal (up to provided threshold), false otherwise.
-