diff --git a/src/site/markdown/tutorials/direct-location-with-DEM.md b/src/site/markdown/tutorials/direct-location-with-DEM.md index 60e5cb6dc1dbdaaa8ada94915a03e62e568d7309..0ce8751e921bbd9f8c12a1f938625ca23d4b630f 100644 --- a/src/site/markdown/tutorials/direct-location-with-DEM.md +++ b/src/site/markdown/tutorials/direct-location-with-DEM.md @@ -142,7 +142,7 @@ In a similar way as in the first tutorial [DirectLocation](./direct-location.htm // Call to direct localization on current line Vector3D position = lineSensor.getPosition(); AbsoluteDate currentLineDate = lineSensor.getDate(currentLine); - Vector3D los = lineSensor.getLos(absDate, currentPx); + Vector3D los = lineSensor.getLOS(absDate, currentPx); pointList.add(rugged.directLocation(currentLineDate, position, los)); } for (GeodeticPoint point : pointList) { diff --git a/src/site/markdown/tutorials/direct-location.md b/src/site/markdown/tutorials/direct-location.md index 8eca894b042d88b7c967706dc4c3b392a0c769e5..0866e25b8294db303cfcc5511e4fb4a3ec80e186 100644 --- a/src/site/markdown/tutorials/direct-location.md +++ b/src/site/markdown/tutorials/direct-location.md @@ -49,7 +49,6 @@ For this we need the following packages import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.los.FixedRotation; import org.orekit.rugged.los.TimeDependentLOS; - import org.orekit.rugged.utils.ParameterType; The raw viewing direction of pixel i with respect to the instrument is defined by the vector: @@ -65,7 +64,7 @@ The instrument is oriented 10° off nadir around the X-axis, we need to rotate t direction to obtain the line of sight in the satellite frame LOSBuilder losBuilder = new LOSBuilder(rawDirs); - losBuilder.addTransform(new FixedRotation(ParameterType.FIXED, Vector3D.PLUS_I, FastMath.toRadians(10))); + losBuilder.addTransform(new FixedRotation("10-degrees-rotation", Vector3D.PLUS_I, FastMath.toRadians(10))); Here we have considered that the viewing directions are constant with time, it is also possible to have time-dependent lines-of-sight by using other transforms. It is also possible to append several @@ -310,7 +309,7 @@ for upper left point (first line, first pixel): import org.orekit.bodies.GeodeticPoint; Vector3D position = lineSensor.getPosition(); // This returns a zero vector since we set the relative position of the sensor w.r.T the satellite to 0. AbsoluteDate firstLineDate = lineSensor.getDate(0); - Vector3D los = lineSensor.getLos(firstLineDate, 0); + Vector3D los = lineSensor.getLOS(firstLineDate, 0); GeodeticPoint upLeftPoint = rugged.directLocation(firstLineDate, position, los); ## Source code diff --git a/src/tutorials/java/fr/cs/examples/DirectLocation.java b/src/tutorials/java/fr/cs/examples/DirectLocation.java index 3ef447969429f9dcaf5a51972cd73e7683a13e80..6e9fa96fe7012070b3d9b12a3a34a9cc7ba7b957 100644 --- a/src/tutorials/java/fr/cs/examples/DirectLocation.java +++ b/src/tutorials/java/fr/cs/examples/DirectLocation.java @@ -43,7 +43,6 @@ import org.orekit.rugged.linesensor.LinearLineDatation; import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.los.FixedRotation; import org.orekit.rugged.los.TimeDependentLOS; -import org.orekit.rugged.utils.ParameterType; import org.orekit.time.AbsoluteDate; import org.orekit.time.TimeScale; import org.orekit.time.TimeScalesFactory; @@ -75,7 +74,7 @@ public class DirectLocation { // The instrument is oriented 10° off nadir around the X-axis, we need to rotate the viewing // direction to obtain the line of sight in the satellite frame LOSBuilder losBuilder = new LOSBuilder(rawDirs); - losBuilder.addTransform(new FixedRotation(ParameterType.FIXED, Vector3D.PLUS_I, FastMath.toRadians(10))); + losBuilder.addTransform(new FixedRotation("10-degrees-rotation", Vector3D.PLUS_I, FastMath.toRadians(10))); TimeDependentLOS lineOfSight = losBuilder.build(); @@ -132,7 +131,7 @@ public class DirectLocation { Vector3D position = lineSensor.getPosition(); // This returns a zero vector since we set the relative position of the sensor w.r.T the satellite to 0. AbsoluteDate firstLineDate = lineSensor.getDate(0); - Vector3D los = lineSensor.getLos(firstLineDate, 0); + Vector3D los = lineSensor.getLOS(firstLineDate, 0); GeodeticPoint upLeftPoint = rugged.directLocation(firstLineDate, position, los); System.out.format(Locale.US, "upper left point: φ = %8.3f °, λ = %8.3f °, h = %8.3f m%n", FastMath.toDegrees(upLeftPoint.getLatitude()), diff --git a/src/tutorials/java/fr/cs/examples/DirectLocationWithDEM.java b/src/tutorials/java/fr/cs/examples/DirectLocationWithDEM.java index 1cfee486f08e58d60d360d0962ffd3ba9390f125..ebbddc7371eed50d273f6018c738de9ff7489146 100644 --- a/src/tutorials/java/fr/cs/examples/DirectLocationWithDEM.java +++ b/src/tutorials/java/fr/cs/examples/DirectLocationWithDEM.java @@ -16,14 +16,14 @@ */ package fr.cs.examples; -import org.hipparchus.geometry.euclidean.threed.Rotation; -import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.hipparchus.util.FastMath; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Locale; +import org.hipparchus.geometry.euclidean.threed.Rotation; +import org.hipparchus.geometry.euclidean.threed.Vector3D; +import org.hipparchus.util.FastMath; import org.orekit.bodies.GeodeticPoint; import org.orekit.data.DataProvidersManager; import org.orekit.data.DirectoryCrawler; @@ -40,12 +40,11 @@ import org.orekit.rugged.api.RuggedBuilder; import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.LinearLineDatation; -import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.los.FixedRotation; +import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.los.TimeDependentLOS; import org.orekit.rugged.raster.TileUpdater; import org.orekit.rugged.raster.UpdatableTile; -import org.orekit.rugged.utils.ParameterType; import org.orekit.time.AbsoluteDate; import org.orekit.time.TimeScale; import org.orekit.time.TimeScalesFactory; @@ -78,7 +77,7 @@ public class DirectLocationWithDEM { // The instrument is oriented 10° off nadir around the X-axis, we need to rotate the viewing // direction to obtain the line of sight in the satellite frame LOSBuilder losBuilder = new LOSBuilder(rawDirs); - losBuilder.addTransform(new FixedRotation(ParameterType.FIXED, Vector3D.PLUS_I, FastMath.toRadians(10))); + losBuilder.addTransform(new FixedRotation("10-degrees-rotation", Vector3D.PLUS_I, FastMath.toRadians(10))); TimeDependentLOS lineOfSight = losBuilder.build(); @@ -142,7 +141,7 @@ public class DirectLocationWithDEM { Vector3D position = lineSensor.getPosition(); // This returns a zero vector since we set the relative position of the sensor w.r.T the satellite to 0. AbsoluteDate firstLineDate = lineSensor.getDate(0); - Vector3D los = lineSensor.getLos(firstLineDate, 0); + Vector3D los = lineSensor.getLOS(firstLineDate, 0); GeodeticPoint upLeftPoint = rugged.directLocation(firstLineDate, position, los); System.out.format(Locale.US, "upper left point: φ = %8.3f °, λ = %8.3f °, h = %8.3f m%n", FastMath.toDegrees(upLeftPoint.getLatitude()), diff --git a/src/tutorials/java/fr/cs/examples/InverseLocation.java b/src/tutorials/java/fr/cs/examples/InverseLocation.java index 9828f9ce5b35204f6b8b2961fcc197f2870790f2..e8c2df5a46d97f97d1b8d5b83633a5cf9e02822f 100644 --- a/src/tutorials/java/fr/cs/examples/InverseLocation.java +++ b/src/tutorials/java/fr/cs/examples/InverseLocation.java @@ -16,14 +16,14 @@ */ package fr.cs.examples; -import org.hipparchus.geometry.euclidean.threed.Rotation; -import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.hipparchus.util.FastMath; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Locale; +import org.hipparchus.geometry.euclidean.threed.Rotation; +import org.hipparchus.geometry.euclidean.threed.Vector3D; +import org.hipparchus.util.FastMath; import org.orekit.bodies.GeodeticPoint; import org.orekit.data.DataProvidersManager; import org.orekit.data.DirectoryCrawler; @@ -41,10 +41,9 @@ import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.LinearLineDatation; import org.orekit.rugged.linesensor.SensorPixel; -import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.los.FixedRotation; +import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.los.TimeDependentLOS; -import org.orekit.rugged.utils.ParameterType; import org.orekit.time.AbsoluteDate; import org.orekit.time.TimeScale; import org.orekit.time.TimeScalesFactory; @@ -76,7 +75,7 @@ public class InverseLocation { // The instrument is oriented 10° off nadir around the X-axis, we need to rotate the viewing // direction to obtain the line of sight in the satellite frame LOSBuilder losBuilder = new LOSBuilder(rawDirs); - losBuilder.addTransform(new FixedRotation(ParameterType.FIXED, Vector3D.PLUS_I, FastMath.toRadians(10))); + losBuilder.addTransform(new FixedRotation("10-degrees-rotation", Vector3D.PLUS_I, FastMath.toRadians(10))); TimeDependentLOS lineOfSight = losBuilder.build();