AcmSatelliteEphemeris.java

  1. /* Copyright 2022-2025 Luc Maisonobe
  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.acm;

  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. /** ACM ephemeris blocks for a single satellite.
  24.  * @author Luc Maisonobe
  25.  * @since 11.0
  26.  */
  27. public class AcmSatelliteEphemeris
  28.     implements AttitudeEphemerisFile.SatelliteAttitudeEphemeris<TimeStampedAngularCoordinates, AttitudeStateHistory> {

  29.     /** Name of the object. */
  30.     private final String name;

  31.     /** The ephemeris data for the satellite. */
  32.     private final List<AttitudeStateHistory> blocks;

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

  44.     /** {@inheritDoc} */
  45.     @Override
  46.     public String getId() {
  47.         return name;
  48.     }

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

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

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

  64. }