OcmData.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.odm.ocm;

  18. import java.util.List;

  19. import org.orekit.files.ccsds.ndm.odm.UserDefined;
  20. import org.orekit.files.ccsds.section.Data;

  21. /** Data container for Orbit Comprehensive Messages.
  22.  * @author Luc Maisonobe
  23.  * @since 11.0
  24.  */
  25. public class OcmData implements Data {

  26.     /** Trajectory state histories logical blocks. */
  27.     private final List<TrajectoryStateHistory> trajectoryBlocks;

  28.     /** Physical properties logical block. */
  29.     private final OrbitPhysicalProperties physicBlock;

  30.     /** Covariance logical blocks. */
  31.     private final List<OrbitCovarianceHistory> covarianceBlocks;

  32.     /** Maneuvers logical blocks. */
  33.     private final List<OrbitManeuverHistory> maneuverBlocks;

  34.     /** Perturbations logical block. */
  35.     private final Perturbations perturbationsBlock;

  36.     /** Orbit determination logical block. */
  37.     private final OrbitDetermination orbitDeterminationBlock;

  38.     /** User defined parameters logical block. */
  39.     private final UserDefined userDefinedBlock;

  40.     /** Simple constructor.
  41.      * @param trajectoryBlocks trajectory state histories logical blocks (may be empty)
  42.      * @param physicBlock physical properties logical block (may be null)
  43.      * @param covarianceBlocks covariance logical blocks (may be empty)
  44.      * @param maneuverBlocks maneuvers logical blocks (may be empty)
  45.      * @param perturbationsBlock perturbations logical block (may be null)
  46.      * @param orbitDeterminationBlock orbit determination logical block (may be null)
  47.      * @param userDefinedBlock user defined parameters logical block (may be null)
  48.      */
  49.     public OcmData(final List<TrajectoryStateHistory> trajectoryBlocks,
  50.                    final OrbitPhysicalProperties           physicBlock,
  51.                    final List<OrbitCovarianceHistory>      covarianceBlocks,
  52.                    final List<OrbitManeuverHistory>        maneuverBlocks,
  53.                    final Perturbations                perturbationsBlock,
  54.                    final OrbitDetermination           orbitDeterminationBlock,
  55.                    final UserDefined                  userDefinedBlock) {
  56.         this.trajectoryBlocks         = trajectoryBlocks;
  57.         this.physicBlock              = physicBlock;
  58.         this.covarianceBlocks         = covarianceBlocks;
  59.         this.maneuverBlocks           = maneuverBlocks;
  60.         this.perturbationsBlock       = perturbationsBlock;
  61.         this.orbitDeterminationBlock  = orbitDeterminationBlock;
  62.         this.userDefinedBlock         = userDefinedBlock;
  63.     }

  64.     /** {@inheritDoc} */
  65.     @Override
  66.     public void validate(final double version) {
  67.         if (trajectoryBlocks != null) {
  68.             for (final TrajectoryStateHistory osh : trajectoryBlocks) {
  69.                 osh.getMetadata().validate(version);
  70.             }
  71.         }
  72.         if (physicBlock != null) {
  73.             physicBlock.validate(version);
  74.         }
  75.         if (covarianceBlocks != null) {
  76.             for (final OrbitCovarianceHistory ch : covarianceBlocks) {
  77.                 ch.getMetadata().validate(version);
  78.             }
  79.         }
  80.         if (maneuverBlocks != null) {
  81.             for (final OrbitManeuverHistory mh : maneuverBlocks) {
  82.                 mh.getMetadata().validate(version);
  83.             }
  84.         }
  85.         if (perturbationsBlock != null) {
  86.             perturbationsBlock.validate(version);
  87.         }
  88.         if (orbitDeterminationBlock != null) {
  89.             orbitDeterminationBlock.validate(version);
  90.         }
  91.         if (userDefinedBlock != null) {
  92.             userDefinedBlock.validate(version);
  93.         }
  94.     }

  95.     /** Get trajectory state histories logical blocks.
  96.      * @return trajectory state histories logical blocks (may be null)
  97.      * @since 12.0
  98.      */
  99.     public List<TrajectoryStateHistory> getTrajectoryBlocks() {
  100.         return trajectoryBlocks;
  101.     }

  102.     /** Get physical properties logical block.
  103.      * @return physical properties logical block (may be null)
  104.      */
  105.     public OrbitPhysicalProperties getPhysicBlock() {
  106.         return physicBlock;
  107.     }

  108.     /** Get covariance logical blocks.
  109.      * @return covariance logical blocks (may be null)
  110.      */
  111.     public List<OrbitCovarianceHistory> getCovarianceBlocks() {
  112.         return covarianceBlocks;
  113.     }

  114.     /** Get maneuvers logical blocks.
  115.      * @return maneuvers logical block (may be null)
  116.      */
  117.     public List<OrbitManeuverHistory> getManeuverBlocks() {
  118.         return maneuverBlocks;
  119.     }

  120.     /** Get perturbations logical block.
  121.      * @return perturbations logical block (may be null)
  122.      */
  123.     public Perturbations getPerturbationsBlock() {
  124.         return perturbationsBlock;
  125.     }

  126.     /** Get orbit determination logical block.
  127.      * @return orbit determination logical block (may be null)
  128.      */
  129.     public OrbitDetermination getOrbitDeterminationBlock() {
  130.         return orbitDeterminationBlock;
  131.     }

  132.     /** Get user defined parameters logical block.
  133.      * @return user defined parameters logical block (may be null)
  134.      */
  135.     public UserDefined getUserDefinedBlock() {
  136.         return userDefinedBlock;
  137.     }

  138. }