AemSatelliteEphemeris.java

  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. import java.util.Collections;
  19. import java.util.List;

  20. import org.orekit.files.general.AttitudeEphemerisFile;
  21. import org.orekit.time.AbsoluteDate;
  22. import org.orekit.utils.TimeStampedAngularCoordinates;

  23. /** AEM ephemeris blocks for a single satellite.
  24.  * @author Bryan Cazabonne
  25.  */
  26. public class AemSatelliteEphemeris
  27.     implements AttitudeEphemerisFile.SatelliteAttitudeEphemeris<TimeStampedAngularCoordinates, AemSegment> {

  28.     /** ID of the satellite. */
  29.     private final String id;

  30.     /** The attitude ephemeris data for the satellite. */
  31.     private final List<AemSegment> blocks;

  32.     /**
  33.      * Create a container for the set of ephemeris blocks in the file that pertain to
  34.      * a single satellite.
  35.      * @param id     of the satellite.
  36.      * @param blocks containing ephemeris data for the satellite.
  37.      * @since 10.3
  38.      */
  39.     public AemSatelliteEphemeris(final String id, final List<AemSegment> blocks) {
  40.         this.id = id;
  41.         this.blocks = blocks;
  42.     }

  43.     /** {@inheritDoc} */
  44.     @Override
  45.     public String getId() {
  46.         return this.id;
  47.     }

  48.     /** {@inheritDoc} */
  49.     @Override
  50.     public List<AemSegment> getSegments() {
  51.         return Collections.unmodifiableList(blocks);
  52.     }

  53.     /** {@inheritDoc} */
  54.     @Override
  55.     public AbsoluteDate getStart() {
  56.         return blocks.get(0).getStart();
  57.     }

  58.     /** {@inheritDoc} */
  59.     @Override
  60.     public AbsoluteDate getStop() {
  61.         return blocks.get(blocks.size() - 1).getStop();
  62.     }

  63. }