Commit 5b2ba4a1 authored by Guylaine Prat's avatar Guylaine Prat
Browse files

In tutorial, rename unappropriate "incidence" angle into roll angle

parent 55da100d
Pipeline #2634 passed with stages
in 5 minutes and 7 seconds
......@@ -84,9 +84,9 @@ public class InitGroundRefiningTest {
// Initialize refining context
// ---------------------------
final String sensorName = "line";
final double incidenceAngle = -5.0;
final double rollAngle = -5.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();
......
......@@ -110,14 +110,14 @@ public class InitInterRefiningTest {
// Initialize refining context
// ---------------------------
final String sensorNameA = "SensorA";
final double incidenceAngleA = -5.0;
final double rollAngleA = -5.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 double incidenceAngleB = 0.0;
final double rollAngleB = 0.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 orbitmodelB = new PleiadesOrbitModel();
......
......@@ -28,21 +28,21 @@ public class PleiadesViewingModel {
private static final int DIMENSION = 40000;
private static final double LINE_PERIOD = 1.e-4;
private double incidenceAngle;
private double rollAngle;
private LineSensor lineSensor;
private String referenceDate;
private String sensorName;
/** PleiadesViewingModel constructor.
* @param sensorName sensor name
* @param incidenceAngle incidence angle
* @param rollAngle roll angle
* @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.referenceDate = referenceDate;
this.incidenceAngle = incidenceAngle;
this.rollAngle = rollAngle;
this.createLineSensor();
}
......@@ -63,10 +63,12 @@ public class PleiadesViewingModel {
*/
public TimeDependentLOS buildLOS() {
final LOSBuilder losBuilder = rawLOS(new Rotation(Vector3D.PLUS_I,
FastMath.toRadians(incidenceAngle),
RotationConvention.VECTOR_OPERATOR).applyTo(Vector3D.PLUS_K),
Vector3D.PLUS_I, FastMath.toRadians(FOV / 2), DIMENSION);
// 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, 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.pitchSuffix, Vector3D.MINUS_J, 0.00));
......
......@@ -305,16 +305,16 @@ public class InterRefining extends Refining {
private InterRefining() {
sensorNameA = "SensorA";
final double incidenceAngleA = -5.0;
final double rollAngleA = -5.0;
final String dateA = "2016-01-01T11:59:50.0";
pleiadesViewingModelA = new PleiadesViewingModel(sensorNameA, incidenceAngleA, dateA);
pleiadesViewingModelA = new PleiadesViewingModel(sensorNameA, rollAngleA, dateA);
sensorNameB = "SensorB";
final double incidenceAngleB = 0.0;
final double rollAngleB = 0.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 {
private static final int DIMENSION = 40000;
private static final double LINE_PERIOD = 1.e-4;
private double angle;
private double rollAngle;
private LineSensor lineSensor;
private String date;
......@@ -62,7 +62,7 @@ public class PleiadesViewingModel {
/** Simple constructor.
* <p>
* 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>
*/
public PleiadesViewingModel(final String sensorName) {
......@@ -72,14 +72,14 @@ public class PleiadesViewingModel {
/** PleiadesViewingModel constructor.
* @param sensorName sensor name
* @param incidenceAngle incidence angle
* @param rollAngle roll angle
* @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.date = referenceDate;
this.angle = incidenceAngle;
this.rollAngle = rollAngle;
this.createLineSensor();
}
......@@ -99,9 +99,12 @@ public class PleiadesViewingModel {
/** Build a LOS provider
*/
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,
FastMath.toRadians(this.angle),
FastMath.toRadians(this.rollAngle),
RotationConvention.VECTOR_OPERATOR).applyTo(Vector3D.PLUS_K),
Vector3D.PLUS_I, FastMath.toRadians(FOV / 2), DIMENSION);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment