KeplerianPropagatorBuilder.java

  1. /* Copyright 2002-2016 CS Systèmes d'Information
  2.  * Licensed to CS Systèmes d'Information (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.propagation.conversion;

  18. import org.orekit.errors.OrekitException;
  19. import org.orekit.frames.Frame;
  20. import org.orekit.orbits.OrbitType;
  21. import org.orekit.orbits.PositionAngle;
  22. import org.orekit.propagation.Propagator;
  23. import org.orekit.propagation.analytical.KeplerianPropagator;
  24. import org.orekit.time.AbsoluteDate;

  25. /** Builder for Keplerian propagator.
  26.  * @author Pascal Parraud
  27.  * @since 6.0
  28.  */
  29. public class KeplerianPropagatorBuilder extends AbstractPropagatorBuilder {

  30.     /** Build a new instance.
  31.      * @param mu central attraction coefficient (m³/s²)
  32.      * @param frame the frame in which the orbit is propagated
  33.      * (<em>must</em> be a {@link Frame#isPseudoInertial pseudo-inertial frame})
  34.      * @deprecated as of 7.1, replaced with {@link #KeplerianPropagatorBuilder(double,
  35.      * Frame, OrbitType, PositionAngle)}
  36.      */
  37.     @Deprecated
  38.     public KeplerianPropagatorBuilder(final double mu, final Frame frame) {
  39.         this(mu, frame, OrbitType.KEPLERIAN, PositionAngle.TRUE);
  40.     }

  41.     /** Build a new instance.
  42.      * @param mu central attraction coefficient (m³/s²)
  43.      * @param frame the frame in which the orbit is propagated
  44.      * (<em>must</em> be a {@link Frame#isPseudoInertial pseudo-inertial frame})
  45.      * @param orbitType orbit type to use
  46.      * @param positionAngle position angle type to use
  47.      * @since 7.1
  48.      */
  49.     public KeplerianPropagatorBuilder(final double mu, final Frame frame,
  50.                                       final OrbitType orbitType, final PositionAngle positionAngle) {
  51.         super(frame, mu, orbitType, positionAngle);
  52.     }

  53.     /** {@inheritDoc} */
  54.     public Propagator buildPropagator(final AbsoluteDate date, final double[] parameters)
  55.         throws OrekitException {
  56.         checkParameters(parameters);
  57.         return new KeplerianPropagator(createInitialOrbit(date, parameters));
  58.     }

  59. }