OcmData.java

  1. /* Copyright 2002-2022 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 LOuc 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 PhysicalProperties physicBlock;

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

  32.     /** Maneuvers logical blocks. */
  33.     private final List<ManeuverHistory> 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 PhysicalProperties           physicBlock,
  51.                    final List<CovarianceHistory>      covarianceBlocks,
  52.                    final List<ManeuverHistory>        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 CovarianceHistory ch : covarianceBlocks) {
  77.                 ch.getMetadata().validate(version);
  78.             }
  79.         }
  80.         if (maneuverBlocks != null) {
  81.             for (final ManeuverHistory 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.      */
  98.     public List<TrajectoryStateHistory> getOTrajectoryBlocks() {
  99.         return trajectoryBlocks;
  100.     }

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

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

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

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

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

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

  137. }