1   /* Copyright 2002-2023 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.gnss;
18  import org.orekit.time.TimeScale;
19  import org.orekit.time.TimeScales;
20  
21  /** Observation time scales.
22   * @since 12.0
23   */
24  public enum ObservationTimeScale {
25  
26      /** GPS time scale. */
27      GPS {
28          public TimeScale getTimeScale(final TimeScales timeScales) {
29              return timeScales.getGPS();
30          }
31      },
32  
33      /** Galileo time scale. */
34      GAL {
35          public TimeScale getTimeScale(final TimeScales timeScales) {
36              return timeScales.getGST();
37          }
38      },
39  
40      /** GLONASS time scale. */
41      GLO {
42          public TimeScale getTimeScale(final TimeScales timeScales) {
43              return timeScales.getGLONASS();
44          }
45      },
46  
47      /** QZSS time scale. */
48      QZS {
49          public TimeScale getTimeScale(final TimeScales timeScales) {
50              return timeScales.getQZSS();
51          }
52      },
53  
54      /** Beidou time scale. */
55      BDT {
56          public TimeScale getTimeScale(final TimeScales timeScales) {
57              return timeScales.getBDT();
58          }
59      },
60  
61      /** IRNSS time scale. */
62      IRN {
63          public TimeScale getTimeScale(final TimeScales timeScales) {
64              return timeScales.getIRNSS();
65          }
66      };
67  
68      /** Get time scale.
69       * @param timeScales time scales factory
70       * @return time scale
71       */
72      public abstract TimeScale getTimeScale(TimeScales timeScales);
73  
74  }