ManeuverTriggersResetter.java

  1. /* Copyright 2002-2025 CS GROUP
  2.  * Licensed to CS GROUP (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.forces.maneuvers.trigger;

  18. import org.orekit.propagation.SpacecraftState;
  19. import org.orekit.time.AbsoluteDate;

  20. /** Resetter for maneuver triggers.
  21.  * @see AbstractManeuverTriggers
  22.  * @author Luc Maisonobe
  23.  * @since 11.1
  24.  */
  25. public interface ManeuverTriggersResetter {

  26.     /** Initialization method called at propagation start.
  27.      * <p>
  28.      * The default implementation does nothing.
  29.      * </p>
  30.      * @param initialState initial spacecraft state (at the start of propagation).
  31.      * @param target date of propagation. Not equal to {@code initialState.getDate()}.
  32.      */
  33.     default void init(SpacecraftState initialState, AbsoluteDate target) {
  34.         // nothing by default
  35.     }

  36.     /** Observe a maneuver trigger.
  37.      * <p>
  38.      * The {@code start} parameter corresponds to physical flow of time
  39.      * from past to future, not to propagation direction which can be backward.
  40.      * This means that during forward propagations, the first call will have
  41.      * {@code start} set to {@code true} and the second call will have
  42.      * {@code start} set to {@code false}, whereas in backward propagation,
  43.      * the first call will have {@code start} set to {@code false} and the second
  44.      * call will have {@code start} set to {@code true}.
  45.      * </p>
  46.      * @param state spacecraft state at trigger date (before applying the maneuver)
  47.      * @param start if true, the trigger is the start of the maneuver
  48.      */
  49.     void maneuverTriggered(SpacecraftState state, boolean start);

  50.     /** Reset state as a maneuver triggers.
  51.      * @param state spacecraft state at trigger date
  52.      * @return reset state taking into account maneuver start/stop
  53.      */
  54.     SpacecraftState resetState(SpacecraftState state);

  55. }