Skip to content
Snippets Groups Projects
Commit ed05541a authored by Guylaine Prat's avatar Guylaine Prat
Browse files

Merge branch 'develop' into zipper-tiles

parents 52976f81 5b2ba4a1
No related branches found
No related tags found
1 merge request!5Add a new setDigitalElevationModel method to deal with non overlapping DEM
Pipeline #2635 passed
...@@ -84,9 +84,9 @@ public class InitGroundRefiningTest { ...@@ -84,9 +84,9 @@ public class InitGroundRefiningTest {
// Initialize refining context // Initialize refining context
// --------------------------- // ---------------------------
final String sensorName = "line"; final String sensorName = "line";
final double incidenceAngle = -5.0; final double rollAngle = -5.0;
final String date = "2016-01-01T11:59:50.0"; final String date = "2016-01-01T11:59:50.0";
this.pleiadesViewingModel = new PleiadesViewingModel(sensorName, incidenceAngle, date); this.pleiadesViewingModel = new PleiadesViewingModel(sensorName, rollAngle, date);
PleiadesOrbitModel orbitmodel = new PleiadesOrbitModel(); PleiadesOrbitModel orbitmodel = new PleiadesOrbitModel();
......
...@@ -110,14 +110,14 @@ public class InitInterRefiningTest { ...@@ -110,14 +110,14 @@ public class InitInterRefiningTest {
// Initialize refining context // Initialize refining context
// --------------------------- // ---------------------------
final String sensorNameA = "SensorA"; final String sensorNameA = "SensorA";
final double incidenceAngleA = -5.0; final double rollAngleA = -5.0;
final String dateA = "2016-01-01T11:59:50.0"; final String dateA = "2016-01-01T11:59:50.0";
this.pleiadesViewingModelA = new PleiadesViewingModel(sensorNameA, incidenceAngleA, dateA); this.pleiadesViewingModelA = new PleiadesViewingModel(sensorNameA, rollAngleA, dateA);
final String sensorNameB = "SensorB"; final String sensorNameB = "SensorB";
final double incidenceAngleB = 0.0; final double rollAngleB = 0.0;
final String dateB = "2016-01-01T12:02:50.0"; final String dateB = "2016-01-01T12:02:50.0";
this.pleiadesViewingModelB = new PleiadesViewingModel(sensorNameB, incidenceAngleB, dateB); this.pleiadesViewingModelB = new PleiadesViewingModel(sensorNameB, rollAngleB, dateB);
PleiadesOrbitModel orbitmodelA = new PleiadesOrbitModel(); PleiadesOrbitModel orbitmodelA = new PleiadesOrbitModel();
PleiadesOrbitModel orbitmodelB = new PleiadesOrbitModel(); PleiadesOrbitModel orbitmodelB = new PleiadesOrbitModel();
......
...@@ -28,21 +28,21 @@ public class PleiadesViewingModel { ...@@ -28,21 +28,21 @@ public class PleiadesViewingModel {
private static final int DIMENSION = 40000; private static final int DIMENSION = 40000;
private static final double LINE_PERIOD = 1.e-4; private static final double LINE_PERIOD = 1.e-4;
private double incidenceAngle; private double rollAngle;
private LineSensor lineSensor; private LineSensor lineSensor;
private String referenceDate; private String referenceDate;
private String sensorName; private String sensorName;
/** PleiadesViewingModel constructor. /** PleiadesViewingModel constructor.
* @param sensorName sensor name * @param sensorName sensor name
* @param incidenceAngle incidence angle * @param rollAngle roll angle
* @param referenceDate reference date * @param referenceDate reference date
*/ */
public PleiadesViewingModel(final String sensorName, final double incidenceAngle, final String referenceDate) { public PleiadesViewingModel(final String sensorName, final double rollAngle, final String referenceDate) {
this.sensorName = sensorName; this.sensorName = sensorName;
this.referenceDate = referenceDate; this.referenceDate = referenceDate;
this.incidenceAngle = incidenceAngle; this.rollAngle = rollAngle;
this.createLineSensor(); this.createLineSensor();
} }
...@@ -63,10 +63,12 @@ public class PleiadesViewingModel { ...@@ -63,10 +63,12 @@ public class PleiadesViewingModel {
*/ */
public TimeDependentLOS buildLOS() { public TimeDependentLOS buildLOS() {
final LOSBuilder losBuilder = rawLOS(new Rotation(Vector3D.PLUS_I, // Roll angle applied to the LOS
FastMath.toRadians(incidenceAngle), // Compute the transformation of vector K (Z axis) through the rotation around I (X axis) with the roll angle
RotationConvention.VECTOR_OPERATOR).applyTo(Vector3D.PLUS_K), // If roll angle = 0: vector center = vector K (Z axis)
Vector3D.PLUS_I, FastMath.toRadians(FOV / 2), DIMENSION); final LOSBuilder losBuilder = rawLOS(new Rotation(Vector3D.PLUS_I, FastMath.toRadians(rollAngle),
RotationConvention.VECTOR_OPERATOR).applyTo(Vector3D.PLUS_K),
Vector3D.PLUS_I, FastMath.toRadians(FOV / 2), DIMENSION);
losBuilder.addTransform(new FixedRotation(sensorName + InitInterRefiningTest.rollSuffix, Vector3D.MINUS_I, 0.00)); losBuilder.addTransform(new FixedRotation(sensorName + InitInterRefiningTest.rollSuffix, Vector3D.MINUS_I, 0.00));
losBuilder.addTransform(new FixedRotation(sensorName + InitInterRefiningTest.pitchSuffix, Vector3D.MINUS_J, 0.00)); losBuilder.addTransform(new FixedRotation(sensorName + InitInterRefiningTest.pitchSuffix, Vector3D.MINUS_J, 0.00));
......
...@@ -305,16 +305,16 @@ public class InterRefining extends Refining { ...@@ -305,16 +305,16 @@ public class InterRefining extends Refining {
private InterRefining() { private InterRefining() {
sensorNameA = "SensorA"; sensorNameA = "SensorA";
final double incidenceAngleA = -5.0; final double rollAngleA = -5.0;
final String dateA = "2016-01-01T11:59:50.0"; final String dateA = "2016-01-01T11:59:50.0";
pleiadesViewingModelA = new PleiadesViewingModel(sensorNameA, incidenceAngleA, dateA); pleiadesViewingModelA = new PleiadesViewingModel(sensorNameA, rollAngleA, dateA);
sensorNameB = "SensorB"; sensorNameB = "SensorB";
final double incidenceAngleB = 0.0; final double rollAngleB = 0.0;
final String dateB = "2016-01-01T12:02:50.0"; final String dateB = "2016-01-01T12:02:50.0";
pleiadesViewingModelB = new PleiadesViewingModel(sensorNameB, incidenceAngleB, dateB); pleiadesViewingModelB = new PleiadesViewingModel(sensorNameB, rollAngleB, dateB);
} }
......
...@@ -52,7 +52,7 @@ public class PleiadesViewingModel { ...@@ -52,7 +52,7 @@ public class PleiadesViewingModel {
private static final int DIMENSION = 40000; private static final int DIMENSION = 40000;
private static final double LINE_PERIOD = 1.e-4; private static final double LINE_PERIOD = 1.e-4;
private double angle; private double rollAngle;
private LineSensor lineSensor; private LineSensor lineSensor;
private String date; private String date;
...@@ -62,7 +62,7 @@ public class PleiadesViewingModel { ...@@ -62,7 +62,7 @@ public class PleiadesViewingModel {
/** Simple constructor. /** Simple constructor.
* <p> * <p>
* initialize PleiadesViewingModel with * initialize PleiadesViewingModel with
* sensorName="line", incidenceAngle = 0.0, date = "2016-01-01T12:00:00.0" * sensorName="line", rollAngle = 0.0, date = "2016-01-01T12:00:00.0"
* </p> * </p>
*/ */
public PleiadesViewingModel(final String sensorName) { public PleiadesViewingModel(final String sensorName) {
...@@ -72,14 +72,14 @@ public class PleiadesViewingModel { ...@@ -72,14 +72,14 @@ public class PleiadesViewingModel {
/** PleiadesViewingModel constructor. /** PleiadesViewingModel constructor.
* @param sensorName sensor name * @param sensorName sensor name
* @param incidenceAngle incidence angle * @param rollAngle roll angle
* @param referenceDate reference date * @param referenceDate reference date
*/ */
public PleiadesViewingModel(final String sensorName, final double incidenceAngle, final String referenceDate) { public PleiadesViewingModel(final String sensorName, final double rollAngle, final String referenceDate) {
this.sensorName = sensorName; this.sensorName = sensorName;
this.date = referenceDate; this.date = referenceDate;
this.angle = incidenceAngle; this.rollAngle = rollAngle;
this.createLineSensor(); this.createLineSensor();
} }
...@@ -99,9 +99,12 @@ public class PleiadesViewingModel { ...@@ -99,9 +99,12 @@ public class PleiadesViewingModel {
/** Build a LOS provider /** Build a LOS provider
*/ */
public TimeDependentLOS buildLOS() { public TimeDependentLOS buildLOS() {
// Roll angle applied to the LOS
// Compute the transformation of vector K (Z axis) through the rotation around I (X axis) with the roll angle
// If roll angle = 0: vector center = vector K (Z axis)
final LOSBuilder losBuilder = rawLOS(new Rotation(Vector3D.PLUS_I, final LOSBuilder losBuilder = rawLOS(new Rotation(Vector3D.PLUS_I,
FastMath.toRadians(this.angle), FastMath.toRadians(this.rollAngle),
RotationConvention.VECTOR_OPERATOR).applyTo(Vector3D.PLUS_K), RotationConvention.VECTOR_OPERATOR).applyTo(Vector3D.PLUS_K),
Vector3D.PLUS_I, FastMath.toRadians(FOV / 2), DIMENSION); Vector3D.PLUS_I, FastMath.toRadians(FOV / 2), DIMENSION);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment