Skip to content
Snippets Groups Projects
Commit ad9ea340 authored by Jonathan Guinet's avatar Jonathan Guinet
Browse files

homothety is shared between pleiades models.

parent cc1c4c01
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,6 @@ public class PleiadesViewingModel { ...@@ -60,7 +60,6 @@ public class PleiadesViewingModel {
public double angle; public double angle;
public LineSensor lineSensor; public LineSensor lineSensor;
public String date; public String date;
private String sensorName; private String sensorName;
...@@ -85,11 +84,11 @@ public class PleiadesViewingModel { ...@@ -85,11 +84,11 @@ public class PleiadesViewingModel {
public PleiadesViewingModel(final String sensorName,final double incidenceAngle,final String referenceDate) throws RuggedException, OrekitException { public PleiadesViewingModel(final String sensorName,final double incidenceAngle,final String referenceDate) throws RuggedException, OrekitException {
this.sensorName = sensorName; this.sensorName = sensorName;
this.date = referenceDate; this.date = referenceDate;
this.angle = incidenceAngle; this.angle = incidenceAngle;
this.createLineSensor(); this.createLineSensor();
} }
public LOSBuilder rawLOS(Vector3D center, Vector3D normal, double halfAperture, int n) public LOSBuilder rawLOS(Vector3D center, Vector3D normal, double halfAperture, int n)
{ {
...@@ -98,13 +97,10 @@ public class PleiadesViewingModel { ...@@ -98,13 +97,10 @@ public class PleiadesViewingModel {
double alpha = (halfAperture * (2 * i + 1 - n)) / (n - 1); double alpha = (halfAperture * (2 * i + 1 - n)) / (n - 1);
list.add(new Rotation(normal, alpha, RotationConvention.VECTOR_OPERATOR).applyTo(center)); list.add(new Rotation(normal, alpha, RotationConvention.VECTOR_OPERATOR).applyTo(center));
} }
return new LOSBuilder(list); return new LOSBuilder(list);
} }
public TimeDependentLOS buildLOS() public TimeDependentLOS buildLOS()
{ {
LOSBuilder losBuilder = rawLOS(new Rotation(Vector3D.PLUS_I, LOSBuilder losBuilder = rawLOS(new Rotation(Vector3D.PLUS_I,
...@@ -113,8 +109,9 @@ public class PleiadesViewingModel { ...@@ -113,8 +109,9 @@ public class PleiadesViewingModel {
losBuilder.addTransform(new FixedRotation(sensorName+"_roll", Vector3D.MINUS_I, 0.00)); losBuilder.addTransform(new FixedRotation(sensorName+"_roll", Vector3D.MINUS_I, 0.00));
losBuilder.addTransform(new FixedRotation(sensorName+"_pitch", Vector3D.MINUS_J, 0.00)); losBuilder.addTransform(new FixedRotation(sensorName+"_pitch", Vector3D.MINUS_J, 0.00));
losBuilder.addTransform(new FixedZHomothety(sensorName+"_factor", 1.0));
//factor is a common parameters shared between all Pleiades models
losBuilder.addTransform(new FixedZHomothety("factor", 1.0));
return losBuilder.build(); return losBuilder.build();
} }
...@@ -126,10 +123,6 @@ public class PleiadesViewingModel { ...@@ -126,10 +123,6 @@ public class PleiadesViewingModel {
return new AbsoluteDate(date, utc); return new AbsoluteDate(date, utc);
} }
public AbsoluteDate getMinDate() throws RuggedException public AbsoluteDate getMinDate() throws RuggedException
{ {
return lineSensor.getDate(0); return lineSensor.getDate(0);
...@@ -148,43 +141,29 @@ public class PleiadesViewingModel { ...@@ -148,43 +141,29 @@ public class PleiadesViewingModel {
return sensorName; return sensorName;
} }
private void createLineSensor() private void createLineSensor()
throws RuggedException, OrekitException { throws RuggedException, OrekitException {
//System.out.println("add line sensor");
// TBN: refining data are read only for level L1B or L1C
//System.out.println("refining info");
// Offset of the MSI from center of mass of satellite // Offset of the MSI from center of mass of satellite
//System.out.println("MSI offset from center of mass of satellite"); //System.out.println("MSI offset from center of mass of satellite");
// one line sensor // one line sensor
// position: 1.5m in front (+X) and 20 cm above (-Z) of the S/C center of mass
// los: swath in the (YZ) plane, looking at 50° roll, 2.6" per pixel // los: swath in the (YZ) plane, looking at 50° roll, 2.6" per pixel
//Vector3D msiOffset = new Vector3D(1.5, 0, -0.2); //Vector3D msiOffset = new Vector3D(1.5, 0, -0.2);
Vector3D msiOffset = new Vector3D(0, 0, 0); Vector3D msiOffset = new Vector3D(0, 0, 0);
// to do build complex los // to do build complex los
TimeDependentLOS lineOfSight = buildLOS(); TimeDependentLOS lineOfSight = buildLOS();
final double rate = 1 / linePeriod; final double rate = 1 / linePeriod;
// linear datation model: at reference time we get the middle line, and the rate is one line every 1.5ms // linear datation model: at reference time we get the middle line, and the rate is one line every 1.5ms
LineDatation lineDatation = new LinearLineDatation(getDatationReference(), dimension / 2, rate); LineDatation lineDatation = new LinearLineDatation(getDatationReference(), dimension / 2, rate);
//LineDatation lineDatation = new LinearLineDatation(absDate, 1d, 20); //LineDatation lineDatation = new LinearLineDatation(absDate, 1d, 20);
lineSensor = new LineSensor(sensorName, lineDatation, msiOffset, lineOfSight); lineSensor = new LineSensor(sensorName, lineDatation, msiOffset, lineOfSight);
} }
} }
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