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.gnss.rflink.gps;
18
19 /**
20 * Base container for sub-frames 4 and 5.
21 * @author Luc Maisonobe
22 * @since 12.0
23 */
24 public class SubFrame45 extends SubFrame {
25
26 /** Index of data ID field. */
27 private static final int DATA_ID = 7;
28
29 /** Index of SV ID field. */
30 private static final int SV_ID = 8;
31
32 /** Simple constructor.
33 * @param words raw words
34 * @param nbFields number of fields in the sub-frame
35 * (including TLM and HOW data fields, excluding non-information and parity)
36 */
37 SubFrame45(final int[] words, final int nbFields) {
38
39 // create raw container
40 super(words, nbFields);
41
42 // populate container
43 setField(DATA_ID, 3, 28, 2, words);
44 setField(SV_ID, 3, 22, 6, words);
45
46 }
47
48 /** Get data ID.
49 * @return data ID
50 */
51 public int getDataId() {
52 return getField(DATA_ID);
53 }
54
55 /** Get SV (page) ID.
56 * @return SV (page) ID
57 */
58 public int getSvId() {
59 return getField(SV_ID);
60 }
61
62 }