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.propagation.analytical.gnss.data;
18
19 import org.orekit.frames.Frame;
20 import org.orekit.gnss.SatelliteSystem;
21 import org.orekit.time.TimeScales;
22
23 /**
24 * Factory for {@link GPSCivilianNavigationMessage}.
25 * @author Luc Maisonobe
26 * @since 14.0
27 */
28 public class GPSCivilianNavigationMessageFactory
29 extends CivilianNavigationMessageFactory<GPSCivilianNavigationMessage> {
30
31 /** Simple constructor.
32 * @param timeScales known time scales
33 * @param system satellite system to use for interpreting week number
34 * @param type message type (null if not a navigation message)
35 * @param inertial reference inertial frame
36 * @param bodyFixed body fixed frame (will be frozen at {@code date} to build the orbital elements
37 * @param cnv2 indicator for CNV 2 messages
38 */
39 public GPSCivilianNavigationMessageFactory(final TimeScales timeScales, final SatelliteSystem system,
40 final String type, final Frame inertial, final Frame bodyFixed,
41 final boolean cnv2) {
42 super(GNSSConstants.GPS_AV, timeScales, system,
43 type, inertial, bodyFixed, GNSSConstants.GPS_MU, cnv2);
44 }
45
46 /** {@inheritDoc} */
47 @Override
48 public GPSCivilianNavigationMessage createFromDrivers() {
49 return new GPSCivilianNavigationMessage(isCnv2(),
50 getTimeScales(), getType(), getPrn(), getTimeOfEphemeris(),
51 createOrbitFromDrivers(),
52 getADotDriver().getValue(),
53 getDeltaN0Driver().getValue(), getDeltaN0DotDriver().getValue(),
54 getIDotDriver().getValue(), getOmegaDotDriver().getValue(),
55 getCucDriver().getValue(), getCusDriver().getValue(),
56 getCrcDriver().getValue(), getCrsDriver().getValue(),
57 getCicDriver().getValue(), getCisDriver().getValue(),
58 getAf0Driver().getValue(), getAf1Driver().getValue(),
59 getAf2Driver().getValue(),
60 getTgd(), getTimeOfClock(), getTransmissionTime(),
61 getSvAccuracy(), getSvHealth(),
62 getIscL1CA(), getIscL1CD(), getIscL1CP(),
63 getIscL2C(), getIscL5I5(), getIscL5Q5(),
64 getUraiEd(),
65 getUraiNed0(), getUraiNed1(), getUraiNed2(),
66 getFlags());
67 }
68
69 }