T
- the type of orbital covariance represented by this classpublic abstract class AbstractOrbitalCovariance<T extends AbstractOrbitalCovariance<T>> extends Object implements TimeStamped, Serializable
An orbital covariance associates a Covariance instance with a given date and the frame, orbit type (Cartesian, Keplerian, etc) and position angle type (mean, true, eccentric) in which it is expressed.
Modifier and Type | Field and Description |
---|---|
protected static int |
ORBIT_DIMENSION
Number of orbital parameters.
|
protected static FieldDescriptor<OrbitalCoordinate> |
ORBITAL_COORDINATE_DESCRIPTOR
Field descriptor used to describe the orbital coordinates.
|
Constructor and Description |
---|
AbstractOrbitalCovariance(Covariance covarianceIn,
Frame frameIn,
OrbitType orbitTypeIn,
PositionAngle positionAngleIn)
Creates a new instance from the supplied covariance, frame, orbit type and position angle
type.
|
AbstractOrbitalCovariance(SymmetricPositiveMatrix covarianceIn,
Frame frameIn,
OrbitType orbitTypeIn,
PositionAngle positionAngleIn)
Creates a new instance from the supplied covariance matrix, frame, orbit type and position
angle type.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkCovarianceMatrixDimension()
Checks the covariance matrix and throws an exception if its dimensions are not large enough
to store the orbital parameters of a single orbit.
|
protected void |
checkCovarianceMatrixDimension(int nbOrbits)
Checks the covariance matrix and throws an exception if its dimensions are not large enough
to store the orbital parameters of a given number of orbits.
|
protected void |
checkOrbit(Orbit orbit)
Checks an orbit and throws an exception if it is
null , or if it is not defined at the
same date as this orbital covariance. |
protected void |
checkParameterDescriptors()
Checks that the first six parameter descriptors associated with the covariance have an
orbital coordinate descriptor which
is mapped to an OrbitalCoordinate instance with the expected state vector index.
|
protected void |
checkParameterDescriptors(int startIndex,
OrbitType expectedOrbitType)
Starting from the specified index, checks that the first six parameter descriptors associated
with the covariance have an orbital
coordinate descriptor which is mapped to an OrbitalCoordinate instance with the
expected state vector index.
|
protected static List<ParameterDescriptor> |
convertParameterDescriptors(Collection<ParameterDescriptor> parameterDescriptors,
OrbitType destOrbitType,
PositionAngle destPositionAngle)
Returns an updated list of parameter descriptors where the orbital coordinates mapped to the
orbital coordinate descriptors were
all converted to the specified orbit type and position angle type.
|
boolean |
equals(Object object) |
Covariance |
getCovariance()
Gets the covariance.
|
SymmetricPositiveMatrix |
getCovarianceMatrix()
Gets the covariance matrix.
|
Frame |
getFrame()
Gets the frame of the covariance.
|
OrbitType |
getOrbitType()
Gets the orbit type of covariance.
|
List<ParameterDescriptor> |
getParameterDescriptors()
Gets the parameter descriptors associated with the covariance matrix.
|
PositionAngle |
getPositionAngle()
Gets the position angle type of the covariance.
|
int |
hashCode() |
protected void |
initParameterDescriptors(int startIndex,
boolean replaceDescriptors)
Starting from the specified index, adds the proper
orbital coordinate
descriptor to the first six parameter descriptors associated with the covariance matrix.
|
protected static <T extends Collection<?>> |
requireNonEmpty(T collection,
String description)
Checks a collection and throws an exception if it is
null or empty. |
protected static <T> T |
requireNonNull(T object,
String description)
Checks an object and throws an exception if it is
null . |
String |
toString()
Returns a string representation of this orbital covariance which includes its date, frame,
orbit type and position angle type, the associated parameter descriptors, but not the
covariance matrix.
|
String |
toString(RealMatrixFormat realMatrixFormat)
Returns a string representation of this orbital covariance which includes its date, frame,
orbit type and position angle type, the associated parameter descriptors, and the covariance
matrix if the provided format is not
null . |
String |
toString(RealMatrixFormat realMatrixFormat,
TimeScale timeScale)
Returns a string representation of this orbital covariance which includes its date, frame,
orbit type and position angle type, the associated parameter descriptors, and the covariance
matrix if the provided format is not
null . |
String |
toString(RealMatrixFormat realMatrixFormat,
TimeScale timeScale,
String nameSeparator,
String fieldSeparator,
boolean printClassName,
boolean reverseOrder)
Returns a string representation of this instance which includes the name of the class (if
requested), the names of the associated parameter descriptors and the the covariance matrix
(if the specified matrix format is not
null ). |
T |
transformTo(Frame destFrame)
Transforms this orbital covariance to the specified frame.
|
T |
transformTo(Frame destFrame,
OrbitType destOrbitType)
Transforms this orbital covariance to the specified frame, orbit type.
|
abstract T |
transformTo(Frame destFrame,
OrbitType destOrbitType,
PositionAngle destPositionAngle)
Transforms this orbital covariance to the specified frame, orbit type and position angle
type.
|
T |
transformTo(OrbitType destOrbitType)
Transforms this orbital covariance to the specified orbit type.
|
T |
transformTo(OrbitType destOrbitType,
PositionAngle destPositionAngle)
Transforms this orbital covariance to the specified orbit type and position angle type.
|
T |
transformTo(PositionAngle destPositionAngle)
Transforms this orbital covariance to the specified position angle type.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDate
protected static final int ORBIT_DIMENSION
protected static final FieldDescriptor<OrbitalCoordinate> ORBITAL_COORDINATE_DESCRIPTOR
public AbstractOrbitalCovariance(SymmetricPositiveMatrix covarianceIn, Frame frameIn, OrbitType orbitTypeIn, PositionAngle positionAngleIn)
covarianceIn
- the covariance matrixframeIn
- the frame of the covarianceorbitTypeIn
- the orbit type of the covariancepositionAngleIn
- the position angle type of the covarianceIllegalArgumentException
- if any of the provided argument is null
public AbstractOrbitalCovariance(Covariance covarianceIn, Frame frameIn, OrbitType orbitTypeIn, PositionAngle positionAngleIn)
covarianceIn
- the orbital covarianceframeIn
- the frame of the covarianceorbitTypeIn
- the orbit type of the covariancepositionAngleIn
- the position angle type of the covarianceIllegalArgumentException
- if any of the provided argument is null
public Covariance getCovariance()
public SymmetricPositiveMatrix getCovarianceMatrix()
public List<ParameterDescriptor> getParameterDescriptors()
public Frame getFrame()
public OrbitType getOrbitType()
public PositionAngle getPositionAngle()
public abstract T transformTo(Frame destFrame, OrbitType destOrbitType, PositionAngle destPositionAngle) throws PatriusException
Important:
The use of non-Cartesian coordinates types may be incompatible with some frames (e.g. local
orbital frames).
destFrame
- the destination framedestOrbitType
- the destination orbit typedestPositionAngle
- the destination position angle typePatriusException
- if the orbital covariance cannot be transformed to the specified frame, orbit type
and position angle typepublic T transformTo(Frame destFrame, OrbitType destOrbitType) throws PatriusException
Important:
The use of non-Cartesian coordinates types may be incompatible with some frames (e.g. local
orbital frames).
destFrame
- the destination framedestOrbitType
- the destination orbit typePatriusException
- if the orbital covariance cannot be transformed to the specified frame and orbit typepublic T transformTo(OrbitType destOrbitType, PositionAngle destPositionAngle) throws PatriusException
Important:
The use of non-Cartesian coordinates types may be incompatible with some frames (e.g. local
orbital frames).
destOrbitType
- the destination orbit typedestPositionAngle
- the destination position angle typePatriusException
- if the orbital covariance cannot be transformed to the specified orbit type and
position angle typepublic T transformTo(Frame destFrame) throws PatriusException
Important:
The use of non-Cartesian coordinates types may be incompatible with some frames (e.g. local
orbital frames).
destFrame
- the destination framePatriusException
- if the orbital covariance cannot be transformed to the specified framepublic T transformTo(OrbitType destOrbitType) throws PatriusException
Important:
The use of non-Cartesian coordinates types may be incompatible with some frames (e.g. local
orbital frames).
destOrbitType
- the destination orbit typePatriusException
- if the orbital covariance cannot be transformed to the specified orbit typepublic T transformTo(PositionAngle destPositionAngle) throws PatriusException
Important:
The use of non-Cartesian coordinates types may be incompatible with some frames (e.g. local
orbital frames).
destPositionAngle
- the destination position angle typePatriusException
- if the orbital covariance cannot be transformed to the specified position angle typepublic String toString()
The date is represented in the TAI time scale.
public String toString(RealMatrixFormat realMatrixFormat)
null
.
The date is represented in the TAI time scale.
realMatrixFormat
- the format used to represent the covariance matrixpublic String toString(RealMatrixFormat realMatrixFormat, TimeScale timeScale)
null
.realMatrixFormat
- the format used to represent the covariance matrixtimeScale
- the time scale used to represent the datepublic String toString(RealMatrixFormat realMatrixFormat, TimeScale timeScale, String nameSeparator, String fieldSeparator, boolean printClassName, boolean reverseOrder)
null
).realMatrixFormat
- the format used to represent the covariance matrixtimeScale
- the time scale used to represent the datenameSeparator
- the string to use as a separator between the names of the parameter descriptorsfieldSeparator
- the string to use as a separator between the field values of a parameter descriptorprintClassName
- whether or not the name of this class should be printedreverseOrder
- whether or not the field values of each parameter descriptor should be printed in
reverse orderprotected static <T> T requireNonNull(T object, String description)
null
.T
- the type of the objectobject
- the object to be checkeddescription
- a short description of the objectnull
IllegalArgumentException
- if the object is null
protected static <T extends Collection<?>> T requireNonEmpty(T collection, String description)
null
or empty.T
- the type of the collectioncollection
- the collection to be checkeddescription
- a short description of the collectionnull
nor emptyIllegalArgumentException
- if the collection is null
or if the collection is emptyprotected void checkOrbit(Orbit orbit)
null
, or if it is not defined at the
same date as this orbital covariance.orbit
- the orbit to be checkedIllegalArgumentException
- if the orbit is null
or if the orbit is not defined at the same date as the
orbital covarianceprotected void checkCovarianceMatrixDimension()
protected void checkCovarianceMatrixDimension(int nbOrbits)
nbOrbits
- the number of orbitsIllegalArgumentException
- if the covariance matrix is not large enough to store the orbital parameters of the
specified number of orbitsprotected void checkParameterDescriptors()
IllegalStateException
- if one of the checked parameter descriptors does not have an orbital coordinate
descriptor, or if it does, but it is mapped to an orbital coordinate with a wrong
state vector indexprotected void checkParameterDescriptors(int startIndex, OrbitType expectedOrbitType)
startIndex
- the start indexexpectedOrbitType
- the orbital coordinate descriptor should be compatible with the expected orbit typeIllegalStateException
- if one of the checked parameter descriptors does not have an orbital coordinate
descriptor, or if it does, but it is mapped to an orbital coordinate with a wrong
state vector indexprotected void initParameterDescriptors(int startIndex, boolean replaceDescriptors)
This method considers that the targeted parameter descriptors are the ones related to the
orbital parameters, in the order defined by the OrbitalCoordinate classes (
CartesianCoordinate, KeplerianCoordinate, ...). If one of the
parameter descriptors checked is already associated with an
orbital
coordinate descriptor, the behavior of the method depends on the replaceDescriptors
argument. If it is set to true
, the previously mapped value is simply ignored and
replaced by the expected orbital coordinate. Otherwise, an exception is thrown.
startIndex
- the start indexreplaceDescriptors
- whether or not to replace the values mapped to the existing orbital coordinate
descriptorsIllegalStateException
- if replaceDescriptors
is true
and one of the parameter descriptors to
initialize already have an orbital coordinate descriptor and it is mapped to an
orbital coordinate that is not the one expectedprotected static List<ParameterDescriptor> convertParameterDescriptors(Collection<ParameterDescriptor> parameterDescriptors, OrbitType destOrbitType, PositionAngle destPositionAngle)
parameterDescriptors
- the parameter descriptors to be updateddestOrbitType
- the destination orbit typedestPositionAngle
- the destination position angle typeCopyright © 2023 CNES. All rights reserved.