1   /* Copyright 2022-2025 Thales Alenia Space
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.time;
18  
19  import org.hipparchus.CalculusFieldElement;
20  
21  /** Container for time stamped clock offset.
22   * @param <T> type of the field elements
23   * @author Luc Maisonobe
24   * @since 12.1
25   */
26  public class FieldClockOffset<T extends CalculusFieldElement<T>> implements FieldTimeStamped<T> {
27  
28      /** Date. */
29      private final FieldAbsoluteDate<T> date;
30  
31      /** Clock offset. */
32      private final T offset;
33  
34      /** Clock rate. */
35      private final T rate;
36  
37      /** Clock acceleration. */
38      private final T acceleration;
39  
40      /** Simple constructor.
41       * @param date   date
42       * @param offset clock offset
43       * @param rate   clock rate (can be set to {@code null} if unknown)
44       * @param acceleration clock acceleration (can be set to {@code null} if unknown)
45       */
46      public FieldClockOffset(final FieldAbsoluteDate<T> date, final T offset,
47                              final T rate, final T acceleration) {
48          this.date         = date;
49          this.offset       = offset;
50          this.rate         = rate;
51          this.acceleration = acceleration;
52      }
53  
54      /** {@inheritDoc} */
55      @Override
56      public FieldAbsoluteDate<T> getDate() {
57          return date;
58      }
59  
60      /** Get offset.
61       * @return offset
62       */
63      public T getOffset() {
64          return offset;
65      }
66  
67      /** Get rate.
68       * @return rate ({@code null} if unknown)
69       */
70      public T getRate() {
71          return rate;
72      }
73  
74      /** Get acceleration.
75       * @return acceleration ({@code null} if unknown)
76       */
77      public T getAcceleration() {
78          return acceleration;
79      }
80  
81  }