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 /** Container for time stamped clock offset.
20 * @author Luc Maisonobe
21 * @since 12.1
22 */
23 public class ClockOffset implements TimeStamped {
24
25 /** Date. */
26 private final AbsoluteDate date;
27
28 /** Clock offset. */
29 private final double offset;
30
31 /** Clock rate. */
32 private final double rate;
33
34 /** Clock acceleration. */
35 private final double acceleration;
36
37 /** Simple constructor.
38 * @param date date
39 * @param offset clock offset
40 * @param rate clock rate (can be set to {@code Double.NaN} if unknown)
41 * @param acceleration clock acceleration (can be set to {@code Double.NaN} if unknown)
42 */
43 public ClockOffset(final AbsoluteDate date, final double offset,
44 final double rate, final double acceleration) {
45 this.date = date;
46 this.offset = offset;
47 this.rate = rate;
48 this.acceleration = acceleration;
49 }
50
51 /** {@inheritDoc} */
52 @Override
53 public AbsoluteDate getDate() {
54 return date;
55 }
56
57 /** Get offset.
58 * @return offset
59 */
60 public double getOffset() {
61 return offset;
62 }
63
64 /** Get rate.
65 * @return rate ({@code Double.NaN} if unknown)
66 */
67 public double getRate() {
68 return rate;
69 }
70
71 /** Get acceleration.
72 * @return acceleration ({@code Double.NaN} if unknown)
73 */
74 public double getAcceleration() {
75 return acceleration;
76 }
77
78 }