1 /* Copyright 2002-2025 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.files.ccsds.ndm.adm.aem;
18
19 import java.util.Collections;
20 import java.util.List;
21
22 import org.orekit.files.general.AttitudeEphemerisFile;
23 import org.orekit.time.AbsoluteDate;
24 import org.orekit.utils.TimeStampedAngularCoordinates;
25
26 /** AEM ephemeris blocks for a single satellite.
27 * @author Bryan Cazabonne
28 */
29 public class AemSatelliteEphemeris
30 implements AttitudeEphemerisFile.SatelliteAttitudeEphemeris<TimeStampedAngularCoordinates, AemSegment> {
31
32 /** ID of the satellite. */
33 private final String id;
34
35 /** The attitude ephemeris data for the satellite. */
36 private final List<AemSegment> blocks;
37
38 /**
39 * Create a container for the set of ephemeris blocks in the file that pertain to
40 * a single satellite.
41 * @param id of the satellite.
42 * @param blocks containing ephemeris data for the satellite.
43 * @since 10.3
44 */
45 public AemSatelliteEphemeris(final String id, final List<AemSegment> blocks) {
46 this.id = id;
47 this.blocks = blocks;
48 }
49
50 /** {@inheritDoc} */
51 @Override
52 public String getId() {
53 return this.id;
54 }
55
56 /** {@inheritDoc} */
57 @Override
58 public List<AemSegment> getSegments() {
59 return Collections.unmodifiableList(blocks);
60 }
61
62 /** {@inheritDoc} */
63 @Override
64 public AbsoluteDate getStart() {
65 return blocks.get(0).getStart();
66 }
67
68 /** {@inheritDoc} */
69 @Override
70 public AbsoluteDate getStop() {
71 return blocks.get(blocks.size() - 1).getStop();
72 }
73
74 }