Ejemplo n.º 1
0
 /** {@inheritDoc} */
 public double getParameter(final String name) throws IllegalArgumentException {
   complainIfNotSupported(name);
   if (name.equals(RadiationSensitive.ABSORPTION_COEFFICIENT)) {
     return spacecraft.getAbsorptionCoefficient();
   }
   return spacecraft.getReflectionCoefficient();
 }
Ejemplo n.º 2
0
 /** {@inheritDoc} */
 public void setParameter(final String name, final double value) throws IllegalArgumentException {
   complainIfNotSupported(name);
   if (name.equals(RadiationSensitive.ABSORPTION_COEFFICIENT)) {
     spacecraft.setAbsorptionCoefficient(value);
   } else {
     spacecraft.setReflectionCoefficient(value);
   }
 }
Ejemplo n.º 3
0
  /** {@inheritDoc} */
  public FieldVector3D<DerivativeStructure> accelerationDerivatives(
      final SpacecraftState s, final String paramName) throws OrekitException {

    complainIfNotSupported(paramName);
    final AbsoluteDate date = s.getDate();
    final Frame frame = s.getFrame();
    final Vector3D position = s.getPVCoordinates().getPosition();
    final Vector3D sunSatVector =
        position.subtract(sun.getPVCoordinates(date, frame).getPosition());
    final double r2 = sunSatVector.getNormSq();

    // compute flux
    final double rawP = kRef * getLightningRatio(position, frame, date) / r2;
    final Vector3D flux = new Vector3D(rawP / FastMath.sqrt(r2), sunSatVector);

    return spacecraft.radiationPressureAcceleration(
        date, frame, position, s.getAttitude().getRotation(), s.getMass(), flux, paramName);
  }
Ejemplo n.º 4
0
  /** {@inheritDoc} */
  public void addContribution(final SpacecraftState s, final TimeDerivativesEquations adder)
      throws OrekitException {

    final AbsoluteDate date = s.getDate();
    final Frame frame = s.getFrame();
    final Vector3D position = s.getPVCoordinates().getPosition();
    final Vector3D sunSatVector =
        position.subtract(sun.getPVCoordinates(date, frame).getPosition());
    final double r2 = sunSatVector.getNormSq();

    // compute flux
    final double rawP = kRef * getLightningRatio(position, frame, date) / r2;
    final Vector3D flux = new Vector3D(rawP / FastMath.sqrt(r2), sunSatVector);

    final Vector3D acceleration =
        spacecraft.radiationPressureAcceleration(
            date, frame, position, s.getAttitude().getRotation(), s.getMass(), flux);

    // provide the perturbing acceleration to the derivatives adder
    adder.addAcceleration(acceleration, s.getFrame());
  }
Ejemplo n.º 5
0
  /** {@inheritDoc} */
  public FieldVector3D<DerivativeStructure> accelerationDerivatives(
      final AbsoluteDate date,
      final Frame frame,
      final FieldVector3D<DerivativeStructure> position,
      final FieldVector3D<DerivativeStructure> velocity,
      final FieldRotation<DerivativeStructure> rotation,
      final DerivativeStructure mass)
      throws OrekitException {

    final FieldVector3D<DerivativeStructure> sunSatVector =
        position.subtract(sun.getPVCoordinates(date, frame).getPosition());
    final DerivativeStructure r2 = sunSatVector.getNormSq();

    // compute flux
    final double ratio = getLightningRatio(position.toVector3D(), frame, date);
    final DerivativeStructure rawP = r2.reciprocal().multiply(kRef * ratio);
    final FieldVector3D<DerivativeStructure> flux =
        new FieldVector3D<DerivativeStructure>(rawP.divide(r2.sqrt()), sunSatVector);

    // compute acceleration with all its partial derivatives
    return spacecraft.radiationPressureAcceleration(date, frame, position, rotation, mass, flux);
  }