public class RuggedBuilder extends Object
Rugged
instances.
This class implements the builder pattern to create Rugged
instances.
It does so by using a fluent API in order to clarify reading and allow
later extensions with new configuration parameters.
A typical use would be:
Rugged rugged = new RuggedBuilder(). setEllipsoid(EllipsoidId.WGS84, BodyRotatingFrameId.ITRF). setAlgorithmID(AlgorithmId.Duvenhage). setDigitalElevationModel(tileUpdater, maxCachedTiles). setTimeSpan(minDate, maxDate, tStep, overshootTolerance). setTrajectory(positionsVelocities, pvInterpolationNumber, pvFilter, quaternions, aInterpolationNumber, aFilter). addLineSensor(sensor1). addLineSensor(sensor2). addLineSensor(sensor3). build();
If a configuration parameter has not been set prior to the call to {]link #build()}, then an exception will be triggered with an explicit error message.
Constructor | Description |
---|---|
RuggedBuilder() |
Create a non-configured builder.
|
Modifier and Type | Method | Description |
---|---|---|
RuggedBuilder |
addLineSensor(LineSensor lineSensor) |
Set up line sensor model.
|
Rugged |
build() |
Build a
Rugged instance. |
RuggedBuilder |
clearLineSensors() |
Remove all line sensors.
|
boolean |
getAberrationOfLightCorrection() |
Get the aberration of light correction flag.
|
org.orekit.utils.AngularDerivativesFilter |
getAFilter() |
Get the filter for derivatives from the sample to use in attitude interpolation.
|
int |
getAInterpolationNumber() |
Get the number of points to use for attitude interpolation.
|
AlgorithmId |
getAlgorithm() |
Get the algorithm to use for Digital Elevation Model intersection.
|
double |
getConstantElevation() |
Get the constant elevation over ellipsoid to use with
AlgorithmId.CONSTANT_ELEVATION_OVER_ELLIPSOID . |
ExtendedEllipsoid |
getEllipsoid() |
Get the ellipsoid.
|
org.orekit.frames.Frame |
getInertialFrame() |
Get the inertial frame.
|
boolean |
getLightTimeCorrection() |
Get the light time correction flag.
|
List<LineSensor> |
getLineSensors() |
Get all line sensors.
|
int |
getMaxCachedTiles() |
Get the maximum number of tiles stored in the cache.
|
org.orekit.time.AbsoluteDate |
getMaxDate() |
Get the end of search time span.
|
org.orekit.time.AbsoluteDate |
getMinDate() |
Get the start of search time span.
|
String |
getName() |
Get the Rugged name.
|
double |
getOvershootTolerance() |
Get the tolerance in seconds allowed for
getMinDate() and getMaxDate() overshooting. |
List<org.orekit.utils.TimeStampedPVCoordinates> |
getPositionsVelocities() |
Get the satellite position and velocity (m and m/s in inertial frame).
|
org.orekit.utils.CartesianDerivativesFilter |
getPVFilter() |
Get the filter for derivatives from the sample to use in position/velocity interpolation.
|
int |
getPVInterpolationNumber() |
Get the number of points to use for position/velocity interpolation.
|
List<org.orekit.utils.TimeStampedAngularCoordinates> |
getQuaternions() |
Get the satellite quaternions with respect to inertial frame.
|
AtmosphericRefraction |
getRefractionCorrection() |
Get the atmospheric refraction model.
|
TileUpdater |
getTileUpdater() |
Get the updater used to load Digital Elevation Model tiles.
|
double |
getTStep() |
Get the step to use for inertial frame to body frame transforms cache computations.
|
RuggedBuilder |
setAberrationOfLightCorrection(boolean newAberrationOfLightCorrection) |
Set flag for aberration of light correction.
|
RuggedBuilder |
setAlgorithm(AlgorithmId newAlgorithmId) |
Set the algorithm to use for Digital Elevation Model intersection.
|
RuggedBuilder |
setConstantElevation(double newConstantElevation) |
Set the user-provided constant elevation model.
|
RuggedBuilder |
setDigitalElevationModel(TileUpdater newTileUpdater,
int newMaxCachedTiles) |
Set the user-provided
tile updater . |
RuggedBuilder |
setEllipsoid(org.orekit.bodies.OneAxisEllipsoid newEllipsoid) |
Set the reference ellipsoid.
|
RuggedBuilder |
setEllipsoid(EllipsoidId ellipsoidID,
BodyRotatingFrameId bodyRotatingFrameID) |
Set the reference ellipsoid.
|
RuggedBuilder |
setLightTimeCorrection(boolean newLightTimeCorrection) |
Set flag for light time correction.
|
void |
setName(String name) |
Set the Rugged name.
|
RuggedBuilder |
setRefractionCorrection(AtmosphericRefraction newAtmosphericRefraction) |
Set atmospheric refraction for line of sight correction.
|
RuggedBuilder |
setTimeSpan(org.orekit.time.AbsoluteDate newMinDate,
org.orekit.time.AbsoluteDate newMaxDate,
double newTstep,
double newOvershootTolerance) |
Set the time span to be covered for direct and inverse location calls.
|
RuggedBuilder |
setTrajectory(double interpolationStep,
int interpolationNumber,
org.orekit.utils.CartesianDerivativesFilter pvFilter,
org.orekit.utils.AngularDerivativesFilter aFilter,
org.orekit.propagation.Propagator propagator) |
Set the spacecraft trajectory.
|
RuggedBuilder |
setTrajectory(org.orekit.frames.Frame inertialFrame,
List<org.orekit.utils.TimeStampedPVCoordinates> positionsVelocities,
int pvInterpolationNumber,
org.orekit.utils.CartesianDerivativesFilter pvFilter,
List<org.orekit.utils.TimeStampedAngularCoordinates> quaternions,
int aInterpolationNumber,
org.orekit.utils.AngularDerivativesFilter aFilter) |
Set the spacecraft trajectory.
|
RuggedBuilder |
setTrajectory(InertialFrameId inertialFrameId,
List<org.orekit.utils.TimeStampedPVCoordinates> positionsVelocities,
int pvInterpolationNumber,
org.orekit.utils.CartesianDerivativesFilter pvFilter,
List<org.orekit.utils.TimeStampedAngularCoordinates> quaternions,
int aInterpolationNumber,
org.orekit.utils.AngularDerivativesFilter aFilter) |
Set the spacecraft trajectory.
|
RuggedBuilder |
setTrajectoryAndTimeSpan(InputStream storageStream) |
Set both the spacecraft trajectory and the time span.
|
void |
storeInterpolator(OutputStream storageStream) |
Store frames transform interpolator.
|
public RuggedBuilder()
The builder must be configured before calling the
build()
method, otherwise an exception will be triggered
at build time.
public RuggedBuilder setEllipsoid(EllipsoidId ellipsoidID, BodyRotatingFrameId bodyRotatingFrameID)
ellipsoidID
- reference ellipsoidbodyRotatingFrameID
- body rotating frame identifier
from an earlier run and frames mismatchsetEllipsoid(OneAxisEllipsoid)
,
getEllipsoid()
public RuggedBuilder setEllipsoid(org.orekit.bodies.OneAxisEllipsoid newEllipsoid)
newEllipsoid
- reference ellipsoidsetEllipsoid(EllipsoidId, BodyRotatingFrameId)
,
getEllipsoid()
public ExtendedEllipsoid getEllipsoid()
setEllipsoid(EllipsoidId, BodyRotatingFrameId)
,
setEllipsoid(OneAxisEllipsoid)
public String getName()
public void setName(String name)
name
- the Rugged namepublic RuggedBuilder setAlgorithm(AlgorithmId newAlgorithmId)
Note that some algorithms require specific other methods to be called too:
DUVENHAGE
,
DUVENHAGE_FLAT_BODY
and BASIC_SLOW_EXHAUSTIVE_SCAN_FOR_TESTS_ONLY
all
require setDigitalElevationModel
to be called,CONSTANT_ELEVATION_OVER_ELLIPSOID
requires
setConstantElevation
to be called,IGNORE_DEM_USE_ELLIPSOID
does not require
any methods tobe called.newAlgorithmId
- identifier of algorithm to use for Digital Elevation Model intersectionsetDigitalElevationModel(TileUpdater, int)
,
getAlgorithm()
public AlgorithmId getAlgorithm()
setAlgorithm(AlgorithmId)
public RuggedBuilder setDigitalElevationModel(TileUpdater newTileUpdater, int newMaxCachedTiles)
tile updater
.
Note that when the algorithm specified in setAlgorithm(AlgorithmId)
is either CONSTANT_ELEVATION_OVER_ELLIPSOID
or IGNORE_DEM_USE_ELLIPSOID
,
then this method becomes irrelevant and can either be not called at all,
or it can be called with an updater set to null
. For all other
algorithms, the updater must be properly configured.
newTileUpdater
- updater used to load Digital Elevation Model tilesnewMaxCachedTiles
- maximum number of tiles stored in the cachesetAlgorithm(AlgorithmId)
,
getTileUpdater()
,
getMaxCachedTiles()
public TileUpdater getTileUpdater()
setDigitalElevationModel(TileUpdater, int)
,
getMaxCachedTiles()
public RuggedBuilder setConstantElevation(double newConstantElevation)
Note that this method is relevant only if the algorithm specified
in setAlgorithm(AlgorithmId)
is CONSTANT_ELEVATION_OVER_ELLIPSOID
.
If it is called for another algorithm, the elevation set here will be ignored.
newConstantElevation
- constant elevation to use (m)setAlgorithm(AlgorithmId)
,
getConstantElevation()
public double getConstantElevation()
AlgorithmId.CONSTANT_ELEVATION_OVER_ELLIPSOID
.setConstantElevation(double)
public int getMaxCachedTiles()
setDigitalElevationModel(TileUpdater, int)
,
getTileUpdater()
public RuggedBuilder setTimeSpan(org.orekit.time.AbsoluteDate newMinDate, org.orekit.time.AbsoluteDate newMaxDate, double newTstep, double newOvershootTolerance)
This method set only the time span and not the trajectory, therefore it
must be used together with either
setTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
setTrajectory(Frame, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
or setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
but should not be mixed with setTrajectoryAndTimeSpan(InputStream)
.
newMinDate
- start of search time spannewMaxDate
- end of search time spannewTstep
- step to use for inertial frame to body frame transforms cache computations (s)newOvershootTolerance
- tolerance in seconds allowed for minDate
and maxDate
overshooting (s)setTrajectoryAndTimeSpan(InputStream)
,
getMinDate()
,
getMaxDate()
,
getTStep()
,
getOvershootTolerance()
public org.orekit.time.AbsoluteDate getMinDate()
setTimeSpan(AbsoluteDate, AbsoluteDate, double, double)
public org.orekit.time.AbsoluteDate getMaxDate()
setTimeSpan(AbsoluteDate, AbsoluteDate, double, double)
public double getTStep()
setTimeSpan(AbsoluteDate, AbsoluteDate, double, double)
public double getOvershootTolerance()
getMinDate()
and getMaxDate()
overshooting.getMinDate()
and getMaxDate()
overshootingsetTimeSpan(AbsoluteDate, AbsoluteDate, double, double)
public RuggedBuilder setTrajectory(InertialFrameId inertialFrameId, List<org.orekit.utils.TimeStampedPVCoordinates> positionsVelocities, int pvInterpolationNumber, org.orekit.utils.CartesianDerivativesFilter pvFilter, List<org.orekit.utils.TimeStampedAngularCoordinates> quaternions, int aInterpolationNumber, org.orekit.utils.AngularDerivativesFilter aFilter)
This method set only the trajectory and not the time span, therefore it
must be used together with the setTimeSpan(AbsoluteDate, AbsoluteDate, double, double)
but should not be mixed with setTrajectoryAndTimeSpan(InputStream)
.
inertialFrameId
- inertial frame Id used for spacecraft positions/velocities/quaternionspositionsVelocities
- satellite position and velocity (m and m/s in inertial frame)pvInterpolationNumber
- number of points to use for position/velocity interpolationpvFilter
- filter for derivatives from the sample to use in position/velocity interpolationquaternions
- satellite quaternions with respect to inertial frameaInterpolationNumber
- number of points to use for attitude interpolationaFilter
- filter for derivatives from the sample to use in attitude interpolationsetTrajectory(Frame, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
,
setTrajectoryAndTimeSpan(InputStream)
,
getInertialFrame()
,
getPositionsVelocities()
,
getPVInterpolationNumber()
,
getPVInterpolationNumber()
,
getQuaternions()
,
getAInterpolationNumber()
,
getAFilter()
public RuggedBuilder setTrajectory(org.orekit.frames.Frame inertialFrame, List<org.orekit.utils.TimeStampedPVCoordinates> positionsVelocities, int pvInterpolationNumber, org.orekit.utils.CartesianDerivativesFilter pvFilter, List<org.orekit.utils.TimeStampedAngularCoordinates> quaternions, int aInterpolationNumber, org.orekit.utils.AngularDerivativesFilter aFilter)
This method set only the trajectory and not the time span, therefore it
must be used together with the setTimeSpan(AbsoluteDate, AbsoluteDate, double, double)
but should not be mixed with setTrajectoryAndTimeSpan(InputStream)
.
inertialFrame
- inertial frame used for spacecraft positions/velocities/quaternionspositionsVelocities
- satellite position and velocity (m and m/s in inertial frame)pvInterpolationNumber
- number of points to use for position/velocity interpolationpvFilter
- filter for derivatives from the sample to use in position/velocity interpolationquaternions
- satellite quaternions with respect to inertial frameaInterpolationNumber
- number of points to use for attitude interpolationaFilter
- filter for derivatives from the sample to use in attitude interpolationsetTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
,
setTrajectoryAndTimeSpan(InputStream)
,
getPositionsVelocities()
,
getPVInterpolationNumber()
,
getPVInterpolationNumber()
,
getQuaternions()
,
getAInterpolationNumber()
,
getAFilter()
public RuggedBuilder setTrajectory(double interpolationStep, int interpolationNumber, org.orekit.utils.CartesianDerivativesFilter pvFilter, org.orekit.utils.AngularDerivativesFilter aFilter, org.orekit.propagation.Propagator propagator)
This method set only the trajectory and not the time span, therefore it
must be used together with the setTimeSpan(AbsoluteDate, AbsoluteDate, double, double)
but should not be mixed with setTrajectoryAndTimeSpan(InputStream)
.
interpolationStep
- step to use for inertial/Earth/spacecraft transforms interpolations (s)interpolationNumber
- number of points to use for inertial/Earth/spacecraft transforms interpolationspvFilter
- filter for derivatives from the sample to use in position/velocity interpolationaFilter
- filter for derivatives from the sample to use in attitude interpolationpropagator
- global propagatorsetTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
setTrajectory(Frame, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
setTrajectoryAndTimeSpan(InputStream)
public org.orekit.frames.Frame getInertialFrame()
public List<org.orekit.utils.TimeStampedPVCoordinates> getPositionsVelocities()
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
public int getPVInterpolationNumber()
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
public org.orekit.utils.CartesianDerivativesFilter getPVFilter()
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
public List<org.orekit.utils.TimeStampedAngularCoordinates> getQuaternions()
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
public int getAInterpolationNumber()
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
public org.orekit.utils.AngularDerivativesFilter getAFilter()
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
public RuggedBuilder setTrajectoryAndTimeSpan(InputStream storageStream)
This method set both the trajectory and the time span in a tightly coupled
way, therefore it should not be mixed with the individual methods
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
,
setTrajectory(Frame, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
setTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
or setTimeSpan(AbsoluteDate, AbsoluteDate, double, double)
.
storageStream
- stream from where to read previous instance stored interpolator
(caller opened it and remains responsible for closing it)setTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
setTrajectory(Frame, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
,
storeInterpolator(OutputStream)
public void storeInterpolator(OutputStream storageStream)
This method allows to reuse the interpolator built in one instance, to build
another instance by calling setTrajectoryAndTimeSpan(InputStream)
.
This reduces the builder initialization time as setting up the interpolator can be long, it is
mainly intended to be used when several runs are done (for example in an image processing chain)
with the same configuration.
This method must be called after both the ellipsoid and trajectory have been set.
storageStream
- stream where to store the interpolator
(caller opened it and remains responsible for closing it)setEllipsoid(EllipsoidId, BodyRotatingFrameId)
,
setEllipsoid(OneAxisEllipsoid)
,
setTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
setTrajectory(Frame, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)
,
setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator)
,
setTrajectoryAndTimeSpan(InputStream)
public RuggedBuilder setLightTimeCorrection(boolean newLightTimeCorrection)
This methods set the flag for compensating or not light time between
ground and spacecraft. Compensating this delay improves location
accuracy and is enabled by default (i.e. not calling this
method before building is therefore equivalent to calling it with
a parameter set to true
). Not compensating it is mainly useful
for validation purposes against system that do not compensate it.
newLightTimeCorrection
- if true, the light travel time between ground
and spacecraft is compensated for more accurate locationsetAberrationOfLightCorrection(boolean)
,
getLightTimeCorrection()
public boolean getLightTimeCorrection()
setLightTimeCorrection(boolean)
public RuggedBuilder setAberrationOfLightCorrection(boolean newAberrationOfLightCorrection)
This methods set the flag for compensating or not aberration of light,
which is velocity composition between light and spacecraft when the
light from ground points reaches the sensor.
Compensating this velocity composition improves location
accuracy and is enabled by default (i.e. not calling this
method before building is therefore equivalent to calling it with
a parameter set to true
). Not compensating it is useful
in two cases: for validation purposes against system that do not
compensate it or when the pixels line of sight already include the
correction.
newAberrationOfLightCorrection
- if true, the aberration of light
is corrected for more accurate locationsetLightTimeCorrection(boolean)
,
getAberrationOfLightCorrection()
public boolean getAberrationOfLightCorrection()
setAberrationOfLightCorrection(boolean)
public RuggedBuilder setRefractionCorrection(AtmosphericRefraction newAtmosphericRefraction)
This method sets an atmospheric refraction model to be used between spacecraft and ground for the correction of intersected points on ground. Compensating for the effect of atmospheric refraction improves location accuracy.
newAtmosphericRefraction
- the atmospheric refraction model to be used for more accurate locationgetRefractionCorrection()
public AtmosphericRefraction getRefractionCorrection()
setRefractionCorrection(AtmosphericRefraction)
public RuggedBuilder addLineSensor(LineSensor lineSensor)
lineSensor
- line sensor modelpublic RuggedBuilder clearLineSensors()
public List<LineSensor> getLineSensors()
Copyright © 2014-2019 CS Systèmes d'information. All rights reserved.