AcmData.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.List;

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

  21. /** Data container for Attitude Comprehensive Messages.
  22.  * @author Luc Maisonobe
  23.  * @since 12.0
  24.  */
  25. public class AcmData implements Data {

  26.     /** Attitude state histories logical blocks. */
  27.     private final List<AttitudeStateHistory> attitudeBlocks;

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

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

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

  34.     /** Attitude determination logical block. */
  35.     private final AttitudeDetermination attitudeDeterminationBlock;

  36.     /** User defined parameters logical block. */
  37.     private final UserDefined userDefinedBlock;

  38.     /** Simple constructor.
  39.      * @param attitudeBlocks attitude state histories logical blocks (may be empty)
  40.      * @param physicBlock physical properties logical block (may be null)
  41.      * @param covarianceBlocks covariance logical blocks (may be empty)
  42.      * @param maneuverBlocks maneuvers logical blocks (may be empty)
  43.      * @param attitudeDeterminationBlock attitude determination logical block (may be null)
  44.      * @param userDefinedBlock user defined parameters logical block (may be null)
  45.      */
  46.     public AcmData(final List<AttitudeStateHistory>      attitudeBlocks,
  47.                    final AttitudePhysicalProperties      physicBlock,
  48.                    final List<AttitudeCovarianceHistory> covarianceBlocks,
  49.                    final List<AttitudeManeuver>          maneuverBlocks,
  50.                    final AttitudeDetermination           attitudeDeterminationBlock,
  51.                    final UserDefined                     userDefinedBlock) {
  52.         this.attitudeBlocks             = attitudeBlocks;
  53.         this.physicBlock                = physicBlock;
  54.         this.covarianceBlocks           = covarianceBlocks;
  55.         this.maneuverBlocks             = maneuverBlocks;
  56.         this.attitudeDeterminationBlock = attitudeDeterminationBlock;
  57.         this.userDefinedBlock           = userDefinedBlock;
  58.     }

  59.     /** {@inheritDoc} */
  60.     @Override
  61.     public void validate(final double version) {
  62.         if (attitudeBlocks != null) {
  63.             for (final AttitudeStateHistory ash : attitudeBlocks) {
  64.                 ash.getMetadata().validate(version);
  65.             }
  66.         }
  67.         if (physicBlock != null) {
  68.             physicBlock.validate(version);
  69.         }
  70.         if (covarianceBlocks != null) {
  71.             for (final AttitudeCovarianceHistory ch : covarianceBlocks) {
  72.                 ch.getMetadata().validate(version);
  73.             }
  74.         }
  75.         if (maneuverBlocks != null) {
  76.             for (final AttitudeManeuver m : maneuverBlocks) {
  77.                 m.validate(version);
  78.             }
  79.         }
  80.         if (attitudeDeterminationBlock != null) {
  81.             attitudeDeterminationBlock.validate(version);
  82.         }
  83.         if (userDefinedBlock != null) {
  84.             userDefinedBlock.validate(version);
  85.         }
  86.     }

  87.     /** Get attitude state histories logical blocks.
  88.      * @return attitude state histories logical blocks (may be null)
  89.      */
  90.     public List<AttitudeStateHistory> getAttitudeBlocks() {
  91.         return attitudeBlocks;
  92.     }

  93.     /** Get physical properties logical block.
  94.      * @return physical properties logical block (may be null)
  95.      */
  96.     public AttitudePhysicalProperties getPhysicBlock() {
  97.         return physicBlock;
  98.     }

  99.     /** Get covariance logical blocks.
  100.      * @return covariance logical blocks (may be null)
  101.      */
  102.     public List<AttitudeCovarianceHistory> getCovarianceBlocks() {
  103.         return covarianceBlocks;
  104.     }

  105.     /** Get maneuvers logical blocks.
  106.      * @return maneuvers logical block (may be null)
  107.      */
  108.     public List<AttitudeManeuver> getManeuverBlocks() {
  109.         return maneuverBlocks;
  110.     }

  111.     /** Get attitude determination logical block.
  112.      * @return attitude determination logical block (may be null)
  113.      */
  114.     public AttitudeDetermination getAttitudeDeterminationBlock() {
  115.         return attitudeDeterminationBlock;
  116.     }

  117.     /** Get user defined parameters logical block.
  118.      * @return user defined parameters logical block (may be null)
  119.      */
  120.     public UserDefined getUserDefinedBlock() {
  121.         return userDefinedBlock;
  122.     }

  123. }