public class IersTechnicalNote36RelativisticCorrectionForce extends ForceModel
KindOfForce.NEWTONIAN_SPECIFIC_FORCE
that models the first order correction to the acceleration of a space object about a CentralBody
(get
/ set
).
The mathematical details for this model may be found in chapter 10 of "IERS Conventions (2010)".
The model was primarily designed for artificial satellites about Earth, but may be used with any space object and any CentralBody
(get
/ set
) in the solar system.
The force always returns the primary contributor to the correction, the Schwarzchild field of the central body.
By default, corrections for frame-dragging and precession of the geodesic are also included, but may be turned off if so desired.Modifier | Constructor and Description |
---|---|
|
IersTechnicalNote36RelativisticCorrectionForce()
Initializes a new instance.
|
|
IersTechnicalNote36RelativisticCorrectionForce(CentralBody centralBody,
double centralBodyGravitationalParameter,
double solarGravitationalParameter)
|
protected |
IersTechnicalNote36RelativisticCorrectionForce(IersTechnicalNote36RelativisticCorrectionForce existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
|
IersTechnicalNote36RelativisticCorrectionForce(Point targetPoint)
Initializes the correction force with the specified
Point . |
|
IersTechnicalNote36RelativisticCorrectionForce(Point targetPoint,
CentralBody centralBody,
CentralBody solarCentralBody,
Vector centralBodyAngularMomentumPerUnitMass,
double centralBodyGravitationalParameter,
double solarGravitationalParameter,
boolean useLenseThirringCorrection,
boolean useDeSitterCorrection)
Initializes the correction force with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
buildForceEvaluator(ResultantForceBuilder builder,
EvaluatorGroup group)
Build lists of principal and perturbation forces based on this model in order to create
an overall resultant force.
|
protected boolean |
checkForSameDefinition(ForceModel other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected boolean |
checkForSameDefinition(IersTechnicalNote36RelativisticCorrectionForce other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
Object |
clone(CopyContext context)
Clones this object using the specified context.
|
protected int |
computeCurrentDefinitionHashCode()
Computes a hash code based on the current properties of this object.
|
void |
enumerateDependencies(DependencyEnumerator enumerator)
Enumerates the dependencies of this object by calling
DependencyEnumerator#enumerate(T) for each object that this object directly depends upon. |
CentralBody |
getCentralBody()
Gets the
CentralBody about which this correction is applied. |
Vector |
getCentralBodyAngularMomentumPerUnitMass()
|
double |
getCentralBodyGravitationalParameter()
|
CentralBody |
getSolarCentralBody()
Gets the
CentralBody that represents the sun of the solar system where this force is used. |
double |
getSolarGravitationalParameter()
Gets the gravitational parameter for the Sun.
|
Point |
getTargetPoint()
Gets the point at which the
IersTechnicalNote36RelativisticCorrectionForce is applied. |
boolean |
getUseDeSitterCorrection()
Gets a value indicating whether the de Sitter correction is to be used.
|
boolean |
getUseLenseThirringCorrection()
Gets a value indicating whether the Lense-Thirring correction is to be used.
|
static Vector |
routhsRuleAngularMomentumPerUnitMass(CentralBody centralBody)
|
static Vector |
scaledAngularVelocityAngularMomentumPerUnitMass(CentralBody centralBody,
double scale)
|
void |
setCentralBody(CentralBody value)
Sets the
CentralBody about which this correction is applied. |
void |
setCentralBodyAngularMomentumPerUnitMass(Vector value)
|
void |
setCentralBodyGravitationalParameter(double value)
|
void |
setSolarCentralBody(CentralBody value)
Sets the
CentralBody that represents the sun of the solar system where this force is used. |
void |
setSolarGravitationalParameter(double value)
Sets the gravitational parameter for the Sun.
|
void |
setTargetPoint(Point value)
Sets the point at which the
IersTechnicalNote36RelativisticCorrectionForce is applied. |
void |
setUseDeSitterCorrection(boolean value)
Sets a value indicating whether the de Sitter correction is to be used.
|
void |
setUseLenseThirringCorrection(boolean value)
Sets a value indicating whether the Lense-Thirring correction is to be used.
|
checkForSameDefinition, freezeAggregatedObjects, getForceEvaluator, getForceEvaluator, getForceVector, getKind, getRole
areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, dictionaryItemsAreSameDefinition, freeze, getCollectionHashCode, getCollectionHashCode, getCollectionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDictionaryHashCode, getIsFrozen, isSameDefinition, throwIfFrozen
public IersTechnicalNote36RelativisticCorrectionForce(CentralBody centralBody, double centralBodyGravitationalParameter, double solarGravitationalParameter)
CentralBody
(get
/ set
), solar gravitational parameter, and central body gravitational parameter.
The SolarCentralBody
(get
/ set
) is set to the sun from the CentralBodiesFacet
.
Both additional corrections (de Sitter and Lense-Thirring) will be used.
The TargetPoint
(get
/ set
) and CentralBodyAngularMomentumPerUnitMass
(get
/ set
) properties will need to be set before use.
centralBody
- The central body to be used in the computation of this force.centralBodyGravitationalParameter
- The gravitational parameter for the central body.solarGravitationalParameter
- The gravitational parameter for the Sun.public IersTechnicalNote36RelativisticCorrectionForce(Point targetPoint)
Point
.
The CentralBody
(get
/ set
) is set to Earth from the CentralBodiesFacet
, and the SolarCentralBody
(get
/ set
) is set to the sun from the CentralBodiesFacet
.
Both additional corrections (de Sitter and Lense-Thirring) will be used.
The gravitational parameters and the CentralBodyAngularMomentumPerUnitMass
(get
/ set
) properties will need to be set before use.
targetPoint
- The point to which this correction force applies.public IersTechnicalNote36RelativisticCorrectionForce(Point targetPoint, CentralBody centralBody, CentralBody solarCentralBody, Vector centralBodyAngularMomentumPerUnitMass, double centralBodyGravitationalParameter, double solarGravitationalParameter, boolean useLenseThirringCorrection, boolean useDeSitterCorrection)
targetPoint
- The point to which this force is applied.centralBody
- The central body about which this force is calculated.solarCentralBody
- The central body that represents the sun of the solar system where this force is used.centralBodyAngularMomentumPerUnitMass
- The vector that specifies the rotational angular momentum per unit mass of the central body.centralBodyGravitationalParameter
- The gravitational parameter for the centralBody
.solarGravitationalParameter
- The gravitational parameter for the Sun.useLenseThirringCorrection
- Set to true
to use the Lense-Thirring correction.useDeSitterCorrection
- Set to true
to use the de Sitter correction.public IersTechnicalNote36RelativisticCorrectionForce()
protected IersTechnicalNote36RelativisticCorrectionForce(@Nonnull IersTechnicalNote36RelativisticCorrectionForce existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext)
for more information about how to implement this constructor
in a derived class.
existingInstance
- The existing instance to copy.context
- A CopyContext
that controls the depth of the copy.ArgumentNullException
- Thrown when existingInstance
or context
is null
.public Object clone(CopyContext context)
This method should be implemented to call a copy constructor on the class of the
object being cloned. The copy constructor should take the CopyContext
as a parameter
in addition to the existing instance to copy. The copy constructor should first call
CopyContext.addObjectMapping(T, T)
to identify the newly constructed instance
as a copy of the existing instance. It should then copy all fields, using
CopyContext.updateReference(T)
to copy any reference fields.
A typical implementation of ICloneWithContext
:
public static class MyClass implements ICloneWithContext {
public MyClass(MyClass existingInstance, CopyContext context) {
context.addObjectMapping(existingInstance, this);
someReference = context.updateReference(existingInstance.someReference);
}
@Override
public final Object clone(CopyContext context) {
return new MyClass(this, context);
}
private Object someReference;
}
In general, all fields that are reference types should be copied with a call to
CopyContext.updateReference(T)
. There are a couple of exceptions:
If one of these exceptions applies, the CopyContext
should be given an opportunity
to update the reference before the reference is copied explicitly. Use
CopyContext.updateReference(T)
to update the reference. If CopyContext.updateReference(T)
returns
the original object, indicating that the context does not have a replacement registered,
then copy the object manually by invoking a Clone method, a copy constructor, or by manually
constructing a new instance and copying the values.
alwaysCopy = context.updateReference(existingInstance.alwaysCopy);
if (existingInstance.alwaysCopy != null && alwaysCopy == existingInstance.alwaysCopy) {
alwaysCopy = (AlwaysCopy) existingInstance.alwaysCopy.clone(context);
}
If you are implementing an evaluator (a class that implements IEvaluator
), the
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
method shares some responsibilities with the
copy context constructor. Code duplication can be avoided by doing the following:
CopyContext.updateReference(T)
. You should still call CopyContext.updateReference(T)
on any references to
non-evaluators.
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
as the last line in the constructor and pass it the
same CopyContext
passed to the constructor.
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
as normal. See the reference documentation for
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
for more information on implementing that method.
public MyClass(MyClass existingInstance, CopyContext context) {
super(existingInstance, context);
someReference = context.updateReference(existingInstance.someReference);
evaluatorReference = existingInstance.evaluatorReference;
updateEvaluatorReferences(context);
}
@Override
public void updateEvaluatorReferences(CopyContext context) {
evaluatorReference = context.updateReference(evaluatorReference);
}
@Override
public Object clone(CopyContext context) {
return new MyClass(this, context);
}
private Object someReference;
private IEvaluator evaluatorReference;
clone
in interface ICloneWithContext
clone
in class DefinitionalObject
context
- The context to use to perform the copy.protected final boolean checkForSameDefinition(ForceModel other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.checkForSameDefinition
in class ForceModel
other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected boolean checkForSameDefinition(@Nullable IersTechnicalNote36RelativisticCorrectionForce other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected int computeCurrentDefinitionHashCode()
IersTechnicalNote36RelativisticCorrectionForce.checkForSameDefinition(agi.foundation.celestial.ForceModel)
method.computeCurrentDefinitionHashCode
in class ForceModel
public void enumerateDependencies(DependencyEnumerator enumerator)
DependencyEnumerator#enumerate(T)
for each object that this object directly depends upon.
Derived classes which contain additional dependencies MUST override this method, call the base
implementation, and enumerate dependencies introduced by the derived class.enumerateDependencies
in interface IEnumerateDependencies
enumerateDependencies
in class ForceModel
enumerator
- The enumerator that is informed of the dependencies of this object.public final Point getTargetPoint()
IersTechnicalNote36RelativisticCorrectionForce
is applied.public final void setTargetPoint(Point value)
IersTechnicalNote36RelativisticCorrectionForce
is applied.public final double getCentralBodyGravitationalParameter()
public final void setCentralBodyGravitationalParameter(double value)
public final double getSolarGravitationalParameter()
public final void setSolarGravitationalParameter(double value)
public final CentralBody getCentralBody()
CentralBody
about which this correction is applied.public final void setCentralBody(CentralBody value)
CentralBody
about which this correction is applied.public final CentralBody getSolarCentralBody()
CentralBody
that represents the sun of the solar system where this force is used.public final void setSolarCentralBody(CentralBody value)
CentralBody
that represents the sun of the solar system where this force is used.public final Vector getCentralBodyAngularMomentumPerUnitMass()
CentralBody
(get
/ set
). This vector is used for the
Lense-Thirring correction, and may be safely ignored if this term is not used. Two easy-to-use static helper methods for this vector exist on this class;
IersTechnicalNote36RelativisticCorrectionForce.routhsRuleAngularMomentumPerUnitMass(agi.foundation.celestial.CentralBody)
and IersTechnicalNote36RelativisticCorrectionForce.scaledAngularVelocityAngularMomentumPerUnitMass(agi.foundation.celestial.CentralBody, double)
.
One way to get this vector easily is to use VectorAngularVelocity
with the axes of the fixed frame of the central body used as the rotating axes,
and the axes of the solar system barycenter's inertial frame used as the reference axes. This angular velocity vector can then be fed into a VectorScaled
using Routh's rule for an ellipsoid, less the mass term, as the scale factor to obtain the desired vector.
public final void setCentralBodyAngularMomentumPerUnitMass(Vector value)
CentralBody
(get
/ set
). This vector is used for the
Lense-Thirring correction, and may be safely ignored if this term is not used. Two easy-to-use static helper methods for this vector exist on this class;
IersTechnicalNote36RelativisticCorrectionForce.routhsRuleAngularMomentumPerUnitMass(agi.foundation.celestial.CentralBody)
and IersTechnicalNote36RelativisticCorrectionForce.scaledAngularVelocityAngularMomentumPerUnitMass(agi.foundation.celestial.CentralBody, double)
.
One way to get this vector easily is to use VectorAngularVelocity
with the axes of the fixed frame of the central body used as the rotating axes,
and the axes of the solar system barycenter's inertial frame used as the reference axes. This angular velocity vector can then be fed into a VectorScaled
using Routh's rule for an ellipsoid, less the mass term, as the scale factor to obtain the desired vector.
@Nonnull public static Vector routhsRuleAngularMomentumPerUnitMass(@Nonnull CentralBody centralBody)
@Nonnull public static Vector scaledAngularVelocityAngularMomentumPerUnitMass(@Nonnull CentralBody centralBody, double scale)
CentralBodyAngularMomentumPerUnitMass
(get
/ set
) vector for the input centralBody
. This method computes the rotational velocity between
the central body's
fixed and inertial frames. This vector is then normalized and the magnitude is set to the input scale factor. An appropriate scale factor for the Earth, for example, would be 9.8e8 m^2/s as was cited
in "IERS Conventions (2010)".public final boolean getUseLenseThirringCorrection()
true
.public final void setUseLenseThirringCorrection(boolean value)
true
.public final boolean getUseDeSitterCorrection()
true
.
This term should not be used if the central body is set to the Sun.
public final void setUseDeSitterCorrection(boolean value)
true
.
This term should not be used if the central body is set to the Sun.
public void buildForceEvaluator(ResultantForceBuilder builder, EvaluatorGroup group)
buildForceEvaluator
in class ForceModel
builder
- The builder object containing the lists and additional information
on the Axes
in which the overall resultant is defined.group
- The evaluator group in which to create evaluators.ArgumentNullException
- Thrown if builder
or group
is null
.PropertyInvalidException
- Thrown if CentralBody
(get
/ set
) or TargetPoint
(get
/ set
) is null
. This exception is also thrown
if CentralBodyAngularMomentumPerUnitMass
(get
/ set
) is null
and the Lense-Thirring correction effect is active.