public class PrecessionNutationInterpolation extends Object implements PrecessionNutationModel
This implementation includes a caching/interpolation feature to tremendously improve efficiency. The IAU-2000 model involves lots of terms (1600 components for x, 1275 components for y and 66 components for s). Recomputing all these components for each point is really slow. The shortest period for these components is about 5.5 days (one fifth of the moon revolution period), hence the pole motion is smooth at the day or week scale. This implies that these motions can be computed accurately using a few reference points per day or week and interpolated between these points. This implementation uses 4 points (CIP and CIP velocities) separated by 1/2 day (43200 seconds) each, the resulting maximal interpolation error on the frame is about 1.3×10-10 arcseconds.
Some information about performance: The CIP coordinates are interpolated
thanks to reference CIPCoordinates that we will call "references".
These references are computed in function of the needs for the interpolation.
For implementation simplicity, it is imposed that there is no holes between
references. Thus, if dates are too apart from each other (more than
allowedExtensionBeforeEphemerisReset holes to be filled), the
references are reinitialized. As a consequence, if the dates are erratically
spread, it is advised to pre-initialize the reference values with
#initializeCipEphemeris in order to avoid too many re-initializations
of the references.
Another aspect is that if the required dates are separated of more than the
getInterpolationStep(), the interpolation management will not be
efficient and it is advised to use a direct PrecessionNutationModel
instead.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_ALLOWED_EXTENSION_BEFORE_EPHEM_RESET
Default allowed extra CIPCoordinates to compute in order to keep the same
ephemeris.
|
static int |
DEFAULT_EPHEM_MAX_SIZE
Default ephemeris max size before resetting for memory usage purpose.
|
static int |
DEFAULT_INTERP_ORDER
Default number of interpolation points.
|
static int |
DEFAULT_INTERP_STEP
Default time span between generated reference points.
|
| Constructor and Description |
|---|
PrecessionNutationInterpolation(PrecessionNutationModel pnModel)
Simple constructor with default values.
|
PrecessionNutationInterpolation(PrecessionNutationModel pnModel,
int interpolationStep,
int interpolationOrder,
int ephemerisMaxSize,
int allowedExtensionBeforeEphemerisReset)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAllowedExtensionBeforeEphemerisReset()
Getter for the maximum allowed reference extensions before reinitialization.
|
CIPCoordinates |
getCIPCoordinates(AbsoluteDate date)
Getter for the CIP coordinates at the provided date.
|
AbsoluteDateInterval |
getCurrentUsableInterval()
Getter for the current usable interval of the ephemeris.
|
double |
getEphemerisCacheReusabilityRatio()
Getter for the cache reusability ratio.
|
int |
getEphemerisMaxSize()
Getter for the maximal internal reference values size before
reinitialization.
|
int |
getEphemerisSize()
Getter for the ephemeris size.
|
int |
getInterpolationOrder()
Getter for the interpolation order.
|
int |
getInterpolationStep()
Getter for the interpolation step.
|
PrecessionNutationModel |
getModel()
Getter for the internal precession nutation model.
|
FrameConvention |
getOrigin()
Get IERS model origin.
|
void |
initializeCIPEphemeris(AbsoluteDate firstUsableDate,
AbsoluteDate lastUsableDate)
Pre-initialize (optional) the CIP coordinates for a given interval for
performance purpose.
|
boolean |
isDirect()
Return computation type : direct or interpolated.
|
public static final int DEFAULT_INTERP_ORDER
public static final int DEFAULT_INTERP_STEP
public static final int DEFAULT_EPHEM_MAX_SIZE
public static final int DEFAULT_ALLOWED_EXTENSION_BEFORE_EPHEM_RESET
public PrecessionNutationInterpolation(PrecessionNutationModel pnModel)
pnModel - Precession nutation model to use (must be a
direct).IllegalArgumentException - if the precession nutation model is not
directpublic PrecessionNutationInterpolation(PrecessionNutationModel pnModel, int interpolationStep, int interpolationOrder, int ephemerisMaxSize, int allowedExtensionBeforeEphemerisReset)
pnModel - Precession nutation model to use
(must be a
direct).interpolationStep - time span between interpolation
pointsinterpolationOrder - number of interpolation points to
useephemerisMaxSize - Max size of the internal
ephemeris before reset (too avoid
memory leaks)allowedExtensionBeforeEphemerisReset - When a new CIP coordinates needs
to be interpolated while not
present in the ephemeris, the
latter is extended. This
parameter corresponds to the
maximum number of CIPCoordinates
allowed for the extension before
resetting the ephemeris around
the required date.IllegalArgumentException - if the number of interpolation points is
< 2public void initializeCIPEphemeris(AbsoluteDate firstUsableDate, AbsoluteDate lastUsableDate)
Can be useful when CIP coordinates are required at very different dates that
would lead to multiple ephemeris re-initializations (with regards to the
allowedExtensionBeforeEphemerisReset.
Calling this method does not prevent the class to extend the ephemeris, it is
just a way to reduce the re-initialization occurrences.
This method is thread-safe.
firstUsableDate - First usable date of the ephemerislastUsableDate - Last usable date of the ephemerisIllegalArgumentException - if the ephemeris exceeds the maximum allowed
sizepublic CIPCoordinates getCIPCoordinates(AbsoluteDate date)
This method is thread-safe.
getCIPCoordinates in interface PrecessionNutationModeldate - Date for the CIP coordinatespublic int getInterpolationOrder()
public int getInterpolationStep()
public int getEphemerisMaxSize()
public int getAllowedExtensionBeforeEphemerisReset()
public PrecessionNutationModel getModel()
public AbsoluteDateInterval getCurrentUsableInterval()
null if
the ephemeris has not been initialized yet.public double getEphemerisCacheReusabilityRatio()
TimeStampedInterpolableEphemeris.getCacheReusabilityRatio() for
more information.public int getEphemerisSize()
public boolean isDirect()
isDirect in interface PrecessionNutationModelpublic FrameConvention getOrigin()
getOrigin in interface PrecessionNutationModelCopyright © 2024 CNES. All rights reserved.