Beispiel #1
0
  /** {@inheritDoc} */
  protected TimeStampedPVCoordinates getTargetPV(
      final PVCoordinatesProvider pvProv, final AbsoluteDate date, final Frame frame)
      throws OrekitException {

    // transform from specified reference frame to spacecraft frame
    final Transform refToSc =
        new Transform(
            date,
            new Transform(date, pvProv.getPVCoordinates(date, frame).negate()),
            new Transform(date, attitudeLaw.getAttitude(pvProv, date, frame).getOrientation()));

    // transform from specified reference frame to body frame
    final Transform refToBody = frame.getTransformTo(shape.getBodyFrame(), date);

    // sample intersection points in current date neighborhood
    final Transform scToBody = new Transform(date, refToSc.getInverse(), refToBody);
    final double h = 0.1;
    final List<TimeStampedPVCoordinates> sample = new ArrayList<TimeStampedPVCoordinates>();
    sample.add(losIntersectionWithBody(scToBody.shiftedBy(-h)));
    sample.add(losIntersectionWithBody(scToBody));
    sample.add(losIntersectionWithBody(scToBody.shiftedBy(+h)));

    // use interpolation to compute properly the time-derivatives
    final TimeStampedPVCoordinates targetBody =
        TimeStampedPVCoordinates.interpolate(date, CartesianDerivativesFilter.USE_P, sample);

    // convert back to caller specified frame
    return refToBody.getInverse().transformPVCoordinates(targetBody);
  }
Beispiel #2
0
 /** {@inheritDoc} */
 @Override
 public Attitude getAttitude(
     final PVCoordinatesProvider pvProv, final AbsoluteDate date, final Frame frame)
     throws OrekitException {
   return attitudeLaw.getAttitude(pvProv, date, frame);
 }