diff --git a/src/main/java/org/orekit/rugged/api/RuggedBuilder.java b/src/main/java/org/orekit/rugged/api/RuggedBuilder.java index a3816eb7e72d3ecfa4a72e528a83a52908c5a8ee..b88862a62477683cfec42e9bbaf861400b1bb3cf 100644 --- a/src/main/java/org/orekit/rugged/api/RuggedBuilder.java +++ b/src/main/java/org/orekit/rugged/api/RuggedBuilder.java @@ -292,7 +292,7 @@ public class RuggedBuilder { * Note that this method is relevant <em>only</em> if the algorithm specified * in {@link #setAlgorithm(AlgorithmId)} is {@link * AlgorithmId#CONSTANT_ELEVATION_OVER_ELLIPSOID CONSTANT_ELEVATION_OVER_ELLIPSOID}. - * If it is called for this algorithm, the elevation set here will be ignored. + * If it is called for another algorithm, the elevation set here will be ignored. * </p> * @param constantElevation constant elevation to use * @return the builder instance @@ -564,17 +564,17 @@ public class RuggedBuilder { * {@link #setTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter)}, * or {@link #setTimeSpan(AbsoluteDate, AbsoluteDate, double, double)}. * </p> - * @param dumpStream stream from where to read previous instance dumped interpolator - * (caller opened it and remains responsible for closing it) + * @param storageStream stream from where to read previous instance {@link #storeInterpolator(OutputStream) + * stored interpolator} (caller opened it and remains responsible for closing it) * @return the builder instance - * @exception RuggedException if dump file cannot be loaded - * or if frames do not match the ones referenced in the dump file + * @exception RuggedException if storage stream cannot be parsed + * or if frames do not match the ones referenced in the storage stream * @see #setTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter) * @see #setTrajectory(Frame, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter) * @see #setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator) - * @see #dumpInterpolator(OutputStream) + * @see #storeInterpolator(OutputStream) */ - public RuggedBuilder setTrajectoryAndTimeSpan(final InputStream dumpStream) + public RuggedBuilder setTrajectoryAndTimeSpan(final InputStream storageStream) throws RuggedException { try { this.inertial = null; @@ -587,7 +587,7 @@ public class RuggedBuilder { this.pvaPropagator = null; this.iStep = Double.NaN; this.iN = -1; - this.scToBody = (SpacecraftToObservedBody) new ObjectInputStream(dumpStream).readObject(); + this.scToBody = (SpacecraftToObservedBody) new ObjectInputStream(storageStream).readObject(); this.minDate = scToBody.getMinDate(); this.maxDate = scToBody.getMaxDate(); this.tStep = scToBody.getTStep(); @@ -603,7 +603,7 @@ public class RuggedBuilder { } } - /** Dump frames transform interpolator. + /** Store frames transform interpolator. * <p> * This method allows to reuse the interpolator built in one instance, to build * another instance by calling {@link #setTrajectoryAndTimeSpan(InputStream)}. @@ -614,9 +614,9 @@ public class RuggedBuilder { * <p> * This method must be called <em>after</em> both the ellipsoid and trajectory have been set. * </p> - * @param dumpStream stream where to dump the interpolator + * @param storageStream stream where to store the interpolator * (caller opened it and remains responsible for closing it) - * @exception RuggedException if interpolator cannot be written to file + * @exception RuggedException if interpolator cannot be written to stream * @see #setEllipsoid(EllipsoidId, BodyRotatingFrameId) * @see #setEllipsoid(OneAxisEllipsoid) * @see #setTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter) @@ -624,10 +624,10 @@ public class RuggedBuilder { * @see #setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator) * @see #setTrajectoryAndTimeSpan(InputStream) */ - public void dumpInterpolator(final OutputStream dumpStream) throws RuggedException { + public void storeInterpolator(final OutputStream storageStream) throws RuggedException { try { createInterpolatorIfNeeded(); - new ObjectOutputStream(dumpStream).writeObject(scToBody); + new ObjectOutputStream(storageStream).writeObject(scToBody); } catch (IOException ioe) { throw new RuggedException(ioe, LocalizedFormats.SIMPLE_MESSAGE, ioe.getMessage()); } diff --git a/src/main/java/org/orekit/rugged/los/TimeDependentLOS.java b/src/main/java/org/orekit/rugged/los/TimeDependentLOS.java index f7406440a7c9687a4da23f91e7c15896359fe0f4..4b0d357a9a27808a77246dd763ccbae81cd7dd11 100644 --- a/src/main/java/org/orekit/rugged/los/TimeDependentLOS.java +++ b/src/main/java/org/orekit/rugged/los/TimeDependentLOS.java @@ -23,7 +23,7 @@ import org.orekit.rugged.utils.ParametricModel; import org.orekit.time.AbsoluteDate; /** Interface representing a line-of-sight which depends on time. - * @see LineSensor + * @see org.orekit.rugged.linesensor.LineSensor * @author Luc Maisonobe */ public interface TimeDependentLOS extends ParametricModel { diff --git a/src/site/markdown/tutorials/direct-location.md b/src/site/markdown/tutorials/direct-location.md index 6ebc2f7b1ace4c21aa5e52370451074405756541..d519d3fccd400c8b199d52c0b9f6294eb0b73797 100644 --- a/src/site/markdown/tutorials/direct-location.md +++ b/src/site/markdown/tutorials/direct-location.md @@ -190,10 +190,10 @@ Finally we can initialize Rugged. It looks like this: import org.orekit.rugged.api.EllipsoidId; import org.orekit.rugged.api.InertialFrameId; import org.orekit.rugged.api.Rugged; + import org.orekit.rugged.api.RuggedBuilder; import org.orekit.rugged.errors.RuggedException; import org.orekit.utils.AngularDerivativesFilter; import org.orekit.utils.CartesianDerivativesFilter; - import org.orekit.utils.IERSConventions; Rugged rugged = new RuggedBuilder(). setAlgorithm(demAlgoId). setDigitalElevationModel(demTileUpdater, nbTiles). @@ -225,7 +225,7 @@ Elevation Model in this tutorial, we could have omitted this call and it would h We preferred to let it in so users do not forget to set the Digital Elevation Model for intersection algorithms that really use them. As the model will be ignored, we can put the parameters for this setter to `null` and `0`. Of course if another algorithm had been chosen, null parameters would clearly -not work, this is explained in another tutorial: [[DirectLocationWithDEM|Direct location with a DEM]]. +not work, this is explained in another tutorial: [Direct location with a DEM](direct-location-with-DEM.html). The *setEllipsoid* setter defines the shape and orientation of the ellipsoid. We use simple predefined enumerates: `EllipsoidId.WGS84`, `InertialFrameId.EME2000`, but could also use a custom ellipsoid if needed. @@ -246,14 +246,13 @@ final timeTolerance parameter is simply a margin used before and after the final allow a slight extrapolation if during a search the interval is slightly overshoot. A typical value is to allow a few images lines so for example a 5 lines tolerance would imply computing the tolerance as: timeTolerance = 5 / lineSensor.getRate(0)). -`BodyRotatingFrameId.ITRF` 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: 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 -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 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. diff --git a/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java b/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java index 4e6b8080b16c719f4f9100e2ef67dd4b353a96a0..fc52853123c7dd60853b42088b0188cb1f551892 100644 --- a/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java +++ b/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java @@ -370,7 +370,7 @@ public class RuggedBuilderTest { addLineSensor(lineSensor); ByteArrayOutputStream bos = new ByteArrayOutputStream(); - original.dumpInterpolator(bos); + original.storeInterpolator(bos); Assert.assertTrue(bos.size() > 100000); Assert.assertTrue(bos.size() < 200000); @@ -434,7 +434,7 @@ public class RuggedBuilderTest { FileOutputStream fos = new FileOutputStream(tempFolder.newFile()); fos.close(); try { - original.dumpInterpolator(fos); + original.storeInterpolator(fos); Assert.fail("an exception should have been thrown"); } catch (RuggedException re) { Assert.assertEquals(IOException.class, re.getCause().getClass()); @@ -482,7 +482,7 @@ public class RuggedBuilderTest { 2, AngularDerivativesFilter.USE_R); ByteArrayOutputStream bos = new ByteArrayOutputStream(); - original.dumpInterpolator(bos); + original.storeInterpolator(bos); Assert.assertTrue(bos.size() > 100000); Assert.assertTrue(bos.size() < 200000);