The *setTrajectory* setter defines the spacecraft evolution. The arguments are the list of time-stamped positions and
The *setTrajectory* setter defines the spacecraft evolution. The arguments are the list of time-stamped positions and
velocities as well as the inertial frame with respect to which they are defined and options for interpolation:
velocities as well as the inertial frame with respect to which they are defined and options for interpolation:
number of points to use and type of filter for derivatives. The interpolation polynomials for nbPVPoints
number of points to use and type of filter for derivatives. The interpolation polynomials for nbPVPoints
without any derivatives (case of `CartesianDerivativesFilter.USE_P`: only positions are used, without velocities)
without any derivatives (case of *CartesianDerivativesFilter.USE_P*: only positions are used, without velocities)
have a degree nbPVPoints - 1. In case of computation with velocities included (case of
have a degree nbPVPoints - 1. In case of computation with velocities included (case of
`CartesianDerivativesFilter.USE_PV`), the interpolation polynomials have a degree 2*nbPVPoints - 1. If the
*CartesianDerivativesFilter.USE_PV*), the interpolation polynomials have a degree 2*nbPVPoints - 1. If the
positions/velocities data are of good quality and separated by a few seconds, one may choose only a few points
positions/velocities data are of good quality and separated by a few seconds, one may choose only a few points
but interpolate with both positions and velocities; in other cases, one may choose more points but interpolate
but interpolate with both positions and velocities; in other cases, one may choose more points but interpolate
only with positions. We find similar arguments for the attitude quaternions.
only with positions. We find similar arguments for the attitude quaternions.
The last setter used, *addLineSensor*, registers a line sensor. As can be deduced from its prefix (`add` instead of `set`), it
The last setter used, *addLineSensor*, registers a line sensor. As can be deduced from its prefix (*add* instead of *set*), it
can be called several time to register several sensors that will all be available in the built Rugged instance.
can be called several time to register several sensors that will all be available in the built Rugged instance.
We have called the method only once here, so we will use only one sensor.
We have called the method only once here, so we will use only one sensor.
After the last setter has been called, we call the `build()` method which really build the Rugged instance
After the last setter has been called, we call the *build()* method which really build the Rugged instance
(and not a RuggedBuilder instance has the setter did).
(and not a RuggedBuilder instance has the setter did).
Rugged takes into account by default some corrections for more accurate locations:
Rugged takes into account by default some corrections for more accurate locations:
...
@@ -272,7 +272,7 @@ Not compensating the delay or the velocity composition are mainly useful for val
...
@@ -272,7 +272,7 @@ Not compensating the delay or the velocity composition are mainly useful for val
that do not compensate it. When the pixels line of sight already includes the aberration of light correction,
that do not compensate it. When the pixels line of sight already includes the aberration of light correction,
one must obviously deactivate the correction.
one must obviously deactivate the correction.
If those corrections should be ignored, some other setters must be inserted before the call to `build()`:
If those corrections should be ignored, some other setters must be inserted before the call to *build()*:
setXxxx().
setXxxx().
setLightTimeCorrection(false).
setLightTimeCorrection(false).
...
@@ -280,9 +280,9 @@ If those corrections should be ignored, some other setters must be inserted befo
...
@@ -280,9 +280,9 @@ If those corrections should be ignored, some other setters must be inserted befo
build();
build();
The various setters can be called in any order. The only important thing is that once a Rugged instance
The various setters can be called in any order. The only important thing is that once a Rugged instance
has been created by calling the `build()` method, it is independent from the builder so later calls
has been created by calling the *build()* method, it is independent from the builder so later calls
to setters will not change the build instance. In fact, it is possible to create a builder, then
to setters will not change the build instance. In fact, it is possible to create a builder, then
call its `build()` method to create a first Rugged instance, and then to modify the builder configuration
call its *build()* method to create a first Rugged instance, and then to modify the builder configuration
by calling again some of the setters and building a second Rugged instance from the new configuration.
by calling again some of the setters and building a second Rugged instance from the new configuration.
This allows to perform comparisons between two different configurations in the same program and without
This allows to perform comparisons between two different configurations in the same program and without
having to recreate everything. For instance, one can procede in three steps like this:
having to recreate everything. For instance, one can procede in three steps like this:
...
@@ -320,4 +320,4 @@ Otherwise an ArrayIndexOutOfBoundsException will be thrown.
...
@@ -320,4 +320,4 @@ Otherwise an ArrayIndexOutOfBoundsException will be thrown.
## Source code
## Source code
The source code is available in DirectLocation.java (package fr.cs.examples under src/tutorials)
The source code is available in [DirectLocation.java](src/tutorials/java/fr/cs/examples/DirectLocation.java)(package fr.cs.examples under src/tutorials)