Skip to content
Snippets Groups Projects
Commit 1b08df16 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Prepared API for LOS calibration.

parent f4826b03
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,8 @@ package org.orekit.rugged.los; ...@@ -19,6 +19,8 @@ package org.orekit.rugged.los;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.geometry.euclidean.threed.FieldVector3D;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.orekit.time.AbsoluteDate; import org.orekit.time.AbsoluteDate;
...@@ -115,7 +117,7 @@ public class LOSBuilder { ...@@ -115,7 +117,7 @@ public class LOSBuilder {
private static class FixedLOS implements TimeDependentLOS { private static class FixedLOS implements TimeDependentLOS {
/** Fixed direction for los. */ /** Fixed direction for los. */
private final Vector3D[] los; private final Vector3D[] los;
/** Simple constructor. /** Simple constructor.
* @param raw raw directions * @param raw raw directions
...@@ -146,6 +148,15 @@ public class LOSBuilder { ...@@ -146,6 +148,15 @@ public class LOSBuilder {
return los[index]; return los[index];
} }
/** {@inheritDoc} */
public FieldVector3D<DerivativeStructure> getLOS(final int index, final AbsoluteDate date,
final double[] parameters) {
// fixed LOS do not depend on any parameters
return new FieldVector3D<DerivativeStructure>(new DerivativeStructure(parameters.length, 1, los[index].getX()),
new DerivativeStructure(parameters.length, 1, los[index].getY()),
new DerivativeStructure(parameters.length, 1, los[index].getZ()));
}
} }
/** Implement time-dependent LOS by applying all registered transforms at runtime. */ /** Implement time-dependent LOS by applying all registered transforms at runtime. */
...@@ -194,6 +205,16 @@ public class LOSBuilder { ...@@ -194,6 +205,16 @@ public class LOSBuilder {
return los.normalize(); return los.normalize();
} }
/** {@inheritDoc} */
public FieldVector3D<DerivativeStructure> getLOS(final int index, final AbsoluteDate date,
final double[] parameters) {
// non-adjustable LOS do not depend on any parameters
final Vector3D los = getLOS(index, date);
return new FieldVector3D<DerivativeStructure>(new DerivativeStructure(parameters.length, 1, los.getX()),
new DerivativeStructure(parameters.length, 1, los.getY()),
new DerivativeStructure(parameters.length, 1, los.getZ()));
}
} }
} }
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
*/ */
package org.orekit.rugged.los; package org.orekit.rugged.los;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.geometry.euclidean.threed.FieldVector3D;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.orekit.time.AbsoluteDate; import org.orekit.time.AbsoluteDate;
...@@ -37,4 +39,18 @@ public interface TimeDependentLOS { ...@@ -37,4 +39,18 @@ public interface TimeDependentLOS {
*/ */
Vector3D getLOS(int index, AbsoluteDate date); Vector3D getLOS(int index, AbsoluteDate date);
/** Get the line of sight and its partial derivatives for a given date.
* <p>
* This method is used for LOS calibration purposes. It allows to compute
* the Jacobian matrix of the LOS with respect to the parameters, which
* are typically polynomials coefficients representing rotation angles.
* These polynomials can be used for example to model thermo-elestic effects.
* </p>
* @param index los pixel index
* @param date date
* @param parameters current estimate of the adjusted parameters
* @return line of sight, and its first partial derivatives with respect to the parameters
*/
FieldVector3D<DerivativeStructure> getLOS(int index, AbsoluteDate date, double[] parameters);
} }
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