Commit 53188c97 authored by Luc Maisonobe's avatar Luc Maisonobe

fixed various javadoc, findbugs and checkstyle errors

parent 34d70fa1
.classpath
.project
bin
target
......@@ -27,22 +27,22 @@ import org.orekit.utils.PVCoordinatesProvider;
* from an {@link AttitudeProvider AttitudeProvider} and a separate {@link PVCoordinatesProvider PVCoordinatesProvider}.</p>
* @author V&eacute;ronique Pommier-Maurussane
* @version $Revision:1665 $ $Date:2008-06-11 12:12:59 +0200 (mer., 11 juin 2008) $
* @since 5.1
*/
public class AttitudeProviderWrapperLaw
implements AttitudeLaw {
public class AttitudeProviderWrapperLaw implements AttitudeLaw {
/** Serializable UID. */
private static final long serialVersionUID = -1690571179199811195L;
private static final long serialVersionUID = 5253238640617158195L;
/** Position-velocity provider. */
PVCoordinatesProvider pvProvider;
private final PVCoordinatesProvider pvProvider;
/** Attitude provider. */
AttitudeProvider attProvider;
private final AttitudeProvider attProvider;
/** Reference frame from which attitude is computed. */
Frame referenceFrame;
private final Frame referenceFrame;
/** Create new instance.
* @param referenceFrame reference frame from which attitude is defined
* @param attProvider attitude provider
......@@ -57,9 +57,8 @@ public class AttitudeProviderWrapperLaw
}
/** {@inheritDoc} */
public Attitude getAttitude(AbsoluteDate date)
public Attitude getAttitude(final AbsoluteDate date)
throws OrekitException {
return attProvider.getAttitude(pvProvider, date, referenceFrame);
}
......
......@@ -45,6 +45,7 @@ import org.orekit.utils.PVCoordinatesProvider;
* is handling of maneuver mode.<p>
* @author Luc Maisonobe
* @version $Revision$ $Date$
* @since 5.1
*/
public class AttitudesSequence implements AttitudeProvider {
......@@ -145,8 +146,8 @@ public class AttitudesSequence implements AttitudeProvider {
}
/** {@inheritDoc} */
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
// delegate attitude computation to the active provider
return active.getAttitude(pvProv, date, frame);
......
......@@ -49,8 +49,8 @@ public class BodyCenterPointing extends GroundPointing {
}
/** {@inheritDoc} */
protected Vector3D getTargetPoint(PVCoordinatesProvider pvProv,
AbsoluteDate date, Frame frame)
protected Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
return getBodyFrame().getTransformTo(frame, date).transformPosition(Vector3D.ZERO);
}
......
......@@ -95,7 +95,7 @@ public class CelestialBodyPointed implements AttitudeProvider {
}
/** {@inheritDoc} */
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
......
......@@ -40,67 +40,67 @@ import org.orekit.time.TimeStamped;
* @see GroundPointing
* @author V&eacute;ronique Pommier-Maurussane
* @version $Revision:1665 $ $Date:2008-06-11 12:12:59 +0200 (mer., 11 juin 2008) $
* @since 5.1
*/
public class DiscreteAttitudeLaw implements AttitudeLaw {
/** Serializable UID. */
private static final long serialVersionUID = -3122873481236995517L;
private static final long serialVersionUID = 3254886991302296757L;
/** Attitude ephemeris array. */
SortedSet<TimeStamped> attSortedEphem;
private final SortedSet<TimeStamped> attSortedEphem;
/** Previous EOP entry. */
protected Attitude prevAtt;
private Attitude prevAtt;
/** Next EOP entry. */
protected Attitude nextAtt;
private Attitude nextAtt;
/** Offset from previous date. */
protected double dtP;
private double dtP;
/** Offset to next date. */
protected double dtN;
private double dtN;
/** Creates new instance.
* @param bodyFrame Body frame
* @param attitudeEphem attitude ephemeris
*/
public DiscreteAttitudeLaw(final Collection<Attitude> attitudeEphem) {
TreeSet<TimeStamped> attSortedEphem = new TreeSet<TimeStamped>(new ChronologicalComparator());
attSortedEphem = new TreeSet<TimeStamped>(new ChronologicalComparator());
attSortedEphem.addAll(attitudeEphem);
this.attSortedEphem = attSortedEphem;
}
/**{@inheritDoc} */
/** {@inheritDoc} */
public Attitude getAttitude(final AbsoluteDate date)
throws OrekitException {
if (prepareInterpolation(date)) {
// Recompute next attitude rotation is reference frame has changed
// Recompute next attitude rotation is reference frame has changed
// (spin is ignored and will be recomputed later)
Rotation nextRot = nextAtt.getRotation();
Transform tPrevToNext = prevAtt.getReferenceFrame().getTransformTo(nextAtt.getReferenceFrame(), date);
Rotation nextRotRe = nextRot.applyTo(tPrevToNext.getRotation());
final Rotation nextRot = nextAtt.getRotation();
final Transform tPrevToNext = prevAtt.getReferenceFrame().getTransformTo(nextAtt.getReferenceFrame(), date);
final Rotation nextRotRe = nextRot.applyTo(tPrevToNext.getRotation());
final AbsoluteDate nextDate = nextAtt.getDate();
final AbsoluteDate prevDate = prevAtt.getDate();
final AbsoluteDate prevDate = prevAtt.getDate();
final double dt = date.durationFrom(prevDate);
final double dtTot = nextDate.durationFrom(prevDate);
final double dtTot = nextDate.durationFrom(prevDate);
// Computation of the interpolated rotation
final Rotation prevRot = prevAtt.getRotation();
Rotation evol = nextRotRe.applyTo(prevRot.revert());
Vector3D axis = evol.getAxis();
double ang = evol.getAngle();
double omega = ang / dtTot;
double interpolatedAngle = dt*omega;
Rotation complementaryRot = new Rotation(axis, interpolatedAngle);
Rotation rot = complementaryRot.applyTo(prevRot);
final Rotation evol = nextRotRe.applyTo(prevRot.revert());
final Vector3D axis = evol.getAxis();
final double ang = evol.getAngle();
final double omega = ang / dtTot;
final double interpolatedAngle = dt * omega;
final Rotation complementaryRot = new Rotation(axis, interpolatedAngle);
final Rotation rot = complementaryRot.applyTo(prevRot);
// Computation of the interpolated spin
Vector3D spin = new Vector3D(omega, axis);
final Vector3D spin = new Vector3D(omega, axis);
return new Attitude(date, prevAtt.getReferenceFrame(), rot, spin);
......@@ -113,7 +113,7 @@ public class DiscreteAttitudeLaw implements AttitudeLaw {
* @param date target date
* @return true if there are entries bracketing the target date
*/
protected synchronized boolean prepareInterpolation(final AbsoluteDate date) {
protected boolean prepareInterpolation(final AbsoluteDate date) {
// compute offsets assuming the current selection brackets the date
dtP = (prevAtt == null) ? -1.0 : date.durationFrom(prevAtt.getDate());
......@@ -157,6 +157,4 @@ public class DiscreteAttitudeLaw implements AttitudeLaw {
}
}
}
......@@ -47,7 +47,7 @@ public class FixedRate implements AttitudeProvider {
}
/** {@inheritDoc} */
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
final double timeShift = date.durationFrom(referenceAttitude.getDate());
......
......@@ -64,26 +64,28 @@ public abstract class GroundPointing implements AttitudeProvider {
}
/** Compute the target point in specified frame.
* @param orbit orbit state
* @param pvProv provider for PV coordinates
* @param date date at which target point is requested
* @param frame frame in which observed ground point should be provided
* @return observed ground point position in specified frame
* @throws OrekitException if some specific error occurs,
* such as no target reached
*/
protected abstract Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
protected abstract Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException;
/** Compute the target point position/velocity in specified frame.
* <p>The default implementation use a simple two points finite differences scheme,
* it may be replaced by more accurate models in specialized implementations.</p>
* @param orbit orbit state
* @param pvProv provider for PV coordinates
* @param date date at which target point is requested
* @param frame frame in which observed ground point should be provided
* @return observed ground point position/velocity in specified frame
* @throws OrekitException if some specific error occurs,
* such as no target reached
*/
protected PVCoordinates getTargetPV(final PVCoordinatesProvider pvProv,
protected PVCoordinates getTargetPV(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
......@@ -103,7 +105,7 @@ public abstract class GroundPointing implements AttitudeProvider {
/** {@inheritDoc} */
public Attitude getAttitude(final PVCoordinatesProvider pvProv, final AbsoluteDate date,
public Attitude getAttitude(final PVCoordinatesProvider pvProv, final AbsoluteDate date,
final Frame frame)
throws OrekitException {
......
......@@ -64,7 +64,7 @@ public abstract class GroundPointingWrapper extends GroundPointing implements At
}
/** {@inheritDoc} */
protected Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
protected Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
return groundPointingLaw.getTargetPoint(pvProv, date, frame);
......@@ -72,18 +72,20 @@ public abstract class GroundPointingWrapper extends GroundPointing implements At
/** {@inheritDoc} */
@Override
protected PVCoordinates getTargetPV(final PVCoordinatesProvider pvProv,
protected PVCoordinates getTargetPV(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
return groundPointingLaw.getTargetPV(pvProv, date, frame);
}
/** Compute the base system state at given date, without compensation.
* @param orbit orbit state for which attitude is requested
* @param pvProv provider for PV coordinates
* @param date date at which state is requested
* @param frame reference frame from which attitude is computed
* @return satellite base attitude state, i.e without compensation.
* @throws OrekitException if some specific error occurs
*/
public Attitude getBaseState(final PVCoordinatesProvider pvProv,
public Attitude getBaseState(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
return groundPointingLaw.getAttitude(pvProv, date, frame);
......@@ -91,7 +93,7 @@ public abstract class GroundPointingWrapper extends GroundPointing implements At
/** {@inheritDoc} */
@Override
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
......@@ -115,14 +117,16 @@ public abstract class GroundPointingWrapper extends GroundPointing implements At
}
/** Compute the compensation rotation at given date.
* @param orbit orbit state for which compensation is requested
* @param pvProv provider for PV coordinates
* @param date date at which rotation is requested
* @param frame reference frame from which attitude is computed
* @param base base satellite attitude in given frame.
* @return compensation rotation at date, i.e rotation between non compensated
* attitude state and compensated state.
* @throws OrekitException if some specific error occurs
*/
public abstract Rotation getCompensation(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame,
public abstract Rotation getCompensation(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame,
final Attitude base)
throws OrekitException;
......
......@@ -53,7 +53,7 @@ public class InertialProvider implements AttitudeProvider {
}
/** {@inheritDoc} */
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
final Transform t = frame.getTransformTo(satelliteFrame, date);
......
......@@ -93,9 +93,9 @@ public class LofOffset implements AttitudeProvider {
/** {@inheritDoc} */
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
final PVCoordinates pv = pvProv.getPVCoordinates(date, frame);
......
......@@ -69,14 +69,14 @@ public class LofOffsetPointing extends GroundPointing {
/** {@inheritDoc} */
@Override
public Attitude getAttitude(final PVCoordinatesProvider pvProv, final AbsoluteDate date,
final Frame frame)
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
return attitudeLaw.getAttitude(pvProv, date, frame);
}
/** {@inheritDoc} */
protected Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
protected Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
......
......@@ -55,7 +55,7 @@ public class NadirPointing extends GroundPointing {
}
/** {@inheritDoc} */
protected Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
protected Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
......
......@@ -16,64 +16,70 @@
*/
package org.orekit.attitudes;
import org.apache.commons.math.geometry.Rotation;
import org.apache.commons.math.geometry.Vector3D;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
import org.orekit.time.AbsoluteDate;
/** Class representing a simple rallying attitude law between two bounding laws.
* <p>
* Rallying is done using Spherical Linear Interpolation (SLERP)
* </p>
* @author V&eacute;ronique Pommier-Maurussane
* @version $Revision$ $Date$
* @since 5.1
*/
public class SlerpRallyingLaw implements AttitudeLaw {
/** Serializable UID. */
private static final long serialVersionUID = 2909376386948681570L;
/** Evolution spin axis. */
final Vector3D evolAxis;
private final Vector3D evolAxis;
/** Evolution spin rate. */
final double evolRate;
private final double evolRate;
/** Evolution spin. */
final Vector3D evolSpin;
private final Vector3D evolSpin;
/** Start attitude. */
final Attitude attitude1;
private final Attitude attitude1;
/** Creates a new instance from a start attitude and an end attitude.
* @param att1 start attitude
* @param att2 end attitude
* @param start start attitude
* @param end end attitude
* @exception OrekitException if the start and end attitudes are not computed
* from the same reference frame
*/
public SlerpRallyingLaw(Attitude att1, Attitude att2)
throws OrekitException {
if (att1.getReferenceFrame() != att2.getReferenceFrame()) {
public SlerpRallyingLaw(final Attitude start, final Attitude end) throws OrekitException {
if (start.getReferenceFrame() != end.getReferenceFrame()) {
throw OrekitException.createIllegalArgumentException(
OrekitMessages.FRAMES_MISMATCH,
att1.getReferenceFrame().getName(), att2.getReferenceFrame().getName());
start.getReferenceFrame().getName(), end.getReferenceFrame().getName());
}
attitude1 = att1;
/** Get evolution rotation */
final Rotation evolution = att1.getRotation().applyTo((att2.getRotation().revert()));
/** Get evolution axis and angle */
attitude1 = start;
// Get evolution rotation
final Rotation evolution = start.getRotation().applyTo(end.getRotation().revert());
// Get evolution axis and angle
evolAxis = evolution.getAxis();
evolRate = -(evolution.getAngle ()) / (att2.getDate().durationFrom(att1.getDate()));
evolRate = -(evolution.getAngle ()) / (end.getDate().durationFrom(start.getDate()));
evolSpin = new Vector3D(evolRate, evolAxis);
}
/*@inherit */
public Attitude getAttitude(AbsoluteDate date)
throws OrekitException {
/** Compute intermediary rotation at required date */
Rotation intermEvolRot = new Rotation(evolAxis, evolRate * date.durationFrom(attitude1.getDate()));
/** {@inheritDoc} */
public Attitude getAttitude(final AbsoluteDate date) throws OrekitException {
// Compute intermediary rotation at required date
final Rotation intermEvolRot = new Rotation(evolAxis, evolRate * date.durationFrom(attitude1.getDate()));
return new Attitude(date, attitude1.getReferenceFrame(),
return new Attitude(date, attitude1.getReferenceFrame(),
intermEvolRot.applyTo(attitude1.getRotation()), evolSpin);
}
......
......@@ -86,7 +86,7 @@ public class SpinStabilized implements AttitudeProviderModifier {
}
/** {@inheritDoc} */
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
......
......@@ -73,7 +73,7 @@ public class TargetPointing extends GroundPointing {
}
/** {@inheritDoc} */
protected Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
protected Vector3D getTargetPoint(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
return getBodyFrame().getTransformTo(frame, date).transformPosition(target.getPosition());
......@@ -81,7 +81,7 @@ public class TargetPointing extends GroundPointing {
/** {@inheritDoc} */
@Override
protected PVCoordinates getTargetPV(final PVCoordinatesProvider pvProv,
protected PVCoordinates getTargetPV(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
return getBodyFrame().getTransformTo(frame, date).transformPVCoordinates(target);
......
......@@ -23,7 +23,15 @@ import org.orekit.frames.Frame;
import org.orekit.time.AbsoluteDate;
import org.orekit.utils.PVCoordinatesProvider;
/** Class representing a pointing law with two references.
* <p>
* The first reference is used as an perfect pointing and the second reference serves
* for phasing around the axis defined by the first reference.
* </p>
* @author V&eacute;ronique Pommier-Maurussane
* @version $Revision$ $Date$
* @since 5.1
*/
public class TwoDirectionsPointingLaw implements AttitudeLaw {
/** Serializable UID. */
......@@ -31,59 +39,59 @@ public class TwoDirectionsPointingLaw implements AttitudeLaw {
/** Reference frame in which targets vectors are given. */
private final Frame referenceFrame;
/** Spacecraft position-velocity provider. */
private final PVCoordinatesProvider pvProvider;
/** Pointing target direction, in inertial frame. */
private final Vector3D pointingTarget;
/** Flag to define if pointing target is a direction or a fixed point. */
private final boolean pointingParallax;
/** Pointing direction, in spacecraft frame. */
private final Vector3D pointingAxis;
/** Pointing target direction, in inertial frame. */
private final Vector3D phasingTarget;
/** Flag to define if phasing target is a direction or a fixed point. */
private final boolean phasingParallax;
/** Phasing target reference direction, in inertial frame. */
private final Vector3D phasingAxis1;
/** Third direction to complete direct frame (pointingTarget, phasingAxis1, phasingAxis2). */
private final Vector3D phasingAxis2;
/** Phasing angle. */
private final double phasingAngle;
/** Build a new instance.
* <p>The first direction is fixed by pointing target and spacecraft pointing axis,
* <p>The first direction is fixed by pointing target and spacecraft pointing axis,
* which is placed exactly in pointing target direction. To complete the attitude computation,
* the third degree of freedom is fixed by phasing target and its position with regard to
* the third degree of freedom is fixed by phasing target and its position with regard to
* meridian plane defined by (pointingAxis, phasing axis 1).
* The phasing angle is the angle between phasing axis 1 and the projection of phasing target
* The phasing angle is the angle between phasing axis 1 and the projection of phasing target
* direction on (phasingAxis1, phasingAxis2) plane. </p>
* <p>Pointing target and phasing target can both either be a direction vector, independent from frame
* (like an angular momentum for example), to which parallax correction should not be applied,
* <p>Pointing target and phasing target can both either be a direction vector, independent from frame
* (like an angular momentum for example), to which parallax correction should not be applied,
* or a fixed point vector, to which parallax correction should be applied.</p>
* @param referenceFrame reference frame in which pointing target and phasing target are given
* @param pvProvider spacecraft position-velocity provider
* @param pointingTarget pointing target
* @param pointingParallax boolean to define if pointing target is a direction or a fixed point
* @param pointingAxis pointing axis, in spacecraft frame
* @param phasing target phasing target
* @param phasingTarget target phasing target
* @param phasingParallax boolean to define if phasing target is a direction or a fixed point
* @param phasingAxis1 axis normal to pointing axis, in spacecraft frame, from which phasing angle is measured
* @param phasingAngle phase angle, measured from meridian plane (pointingAxis, phasingAxis), in the plane normal to pointingTarget
*/
protected TwoDirectionsPointingLaw(final Frame referenceFrame, final PVCoordinatesProvider pvProvider,
final Vector3D pointingTarget, final boolean pointingParallax,
final Vector3D pointingAxis,
final Vector3D phasingTarget, final boolean phasingParallax,
final Vector3D pointingAxis,
final Vector3D phasingTarget, final boolean phasingParallax,
final Vector3D phasingAxis1, final double phasingAngle) {
this.referenceFrame = referenceFrame;
......@@ -97,33 +105,33 @@ public class TwoDirectionsPointingLaw implements AttitudeLaw {
this.phasingParallax = phasingParallax;
this.phasingAngle = phasingAngle;
}
/** {@inheritDoc} */
public Attitude getAttitude(final AbsoluteDate date)
throws OrekitException {
public Attitude getAttitude(final AbsoluteDate date) throws OrekitException {
Vector3D pointingTargetDirection = pointingTarget;
Vector3D phasingTargetDirection = phasingTarget;
// If parallax correction are needed
if (pointingParallax) {
pointingTargetDirection = pointingTargetDirection.subtract(pvProvider.getPVCoordinates(date, referenceFrame).getPosition());
pointingTargetDirection = pointingTargetDirection.subtract(pvProvider.getPVCoordinates(date, referenceFrame).getPosition());
}
if (phasingParallax) {
phasingTargetDirection = phasingTargetDirection.subtract(pvProvider.getPVCoordinates(date, referenceFrame).getPosition());
}
// Phasing target is in meridian plane at defined angle (target phase) from phasing axis
Vector3D phasingDirSat = new Vector3D(Math.cos(phasingAngle), phasingAxis1, Math.sin(phasingAngle), phasingAxis2);
final Vector3D phasingDirSat = new Vector3D(Math.cos(phasingAngle), phasingAxis1, Math.sin(phasingAngle), phasingAxis2);
// Construction of the attitude rotation :
// 1/ Pointing axis in target direction from satellite :
// 2/ Phasing target is in meridian plane at defined angle (target phase) from off axis 1
Rotation attRot = new Rotation(pointingTarget, phasingTarget, pointingAxis, phasingDirSat);
final Rotation attRot = new Rotation(pointingTargetDirection, phasingTargetDirection,
pointingAxis, phasingDirSat);
// Spin is forced to null for the moment, implementation of spin computation will be added later
Vector3D attSpin = new Vector3D(0., 0., 0.);
final Vector3D attSpin = new Vector3D(0., 0., 0.);
return new Attitude(date, referenceFrame, attRot, attSpin);
}
......
......@@ -62,16 +62,16 @@ public class YawCompensation extends GroundPointingWrapper {
}
/** {@inheritDoc} */
public Rotation getCompensation(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame orbitFrame,
public Rotation getCompensation(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame orbitFrame,
final Attitude base)
throws OrekitException {
// compute relative velocity of FIXED ground point with respect to satellite
// beware the point considered is NOT the sliding point on central body surface
// as returned by getGroundPointingLaw().getTargetPV(), but the fixed point that
// at current time is the target, but before and after is only a body surface
// point with its own motion and not aligned with satellite Z axis.
// as returned by getUnderlyingAttitudeProvider().getTargetPV(), but the fixed
// point that at current time is the target, but before and after is only a body
// surface point with its own motion and not aligned with satellite Z axis.
// So the following computation needs to recompute velocity by itself, using
// the velocity provided by getTargetPV would be wrong!
final Frame bodyFrame = getBodyFrame();
......@@ -93,11 +93,13 @@ public class YawCompensation extends GroundPointingWrapper {
}
/** Compute the yaw compensation angle at date.
* @param orbit orbit state
* @param pvProv provider for PV coordinates
* @param date date at which compensation is requested
* @param frame reference frame from which attitude is computed
* @return yaw compensation angle for orbit.
* @throws OrekitException if some specific error occurs
*/
public double getYawAngle(final PVCoordinatesProvider pvProv,
public double getYawAngle(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame)
throws OrekitException {
return getCompensation(pvProv, date, frame, getBaseState(pvProv, date, frame)).getAngle();
......
......@@ -86,8 +86,8 @@ public class YawSteering extends GroundPointingWrapper {
}
/** {@inheritDoc} */
public Rotation getCompensation(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame orbitFrame,
public Rotation getCompensation(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame orbitFrame,
final Attitude base)