OcmMetadata.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.data.DataContext;
  20. import org.orekit.files.ccsds.definitions.TimeSystem;
  21. import org.orekit.files.ccsds.ndm.odm.OdmMetadata;
  22. import org.orekit.files.ccsds.section.MetadataKey;
  23. import org.orekit.time.AbsoluteDate;

  24. /** Meta-data for {@link OcmMetadata Orbit Comprehensive Message}.
  25.  * @since 11.0
  26.  */
  27. public class OcmMetadata extends OdmMetadata {

  28.     /** Default value for SCLK_OFFSET_AT_EPOCH.
  29.      * @since 12.0
  30.      */
  31.     public static final double DEFAULT_SCLK_OFFSET_AT_EPOCH = 0.0;

  32.     /** Default value for SCLK_SEC_PER_SI_SEC.
  33.      * @since 12.0
  34.      */
  35.     public static final double DEFAULT_SCLK_SEC_PER_SI_SEC = 1.0;

  36.     /** International designator for the object as assigned by the UN Committee
  37.      * on Space Research (COSPAR) and the US National Space Science Data Center (NSSDC). */
  38.     private String internationalDesignator;

  39.     /** Specification of satellite catalog source. */
  40.     private String catalogName;

  41.     /** Unique satellite identification designator for the object. */
  42.     private String objectDesignator;

  43.     /** Alternate names for this space object. */
  44.     private List<String> alternateNames;

  45.     /** Programmatic Point Of Contact at originator. */
  46.     private String originatorPOC;

  47.     /** Position of Programmatic Point Of Contact at originator. */
  48.     private String originatorPosition;

  49.     /** Phone number of Programmatic Point Of Contact at originator. */
  50.     private String originatorPhone;

  51.     /** Email address of Programmatic Point Of Contact at originator.
  52.      * @since 11.2
  53.      */
  54.     private String originatorEmail;

  55.     /** Address of Programmatic Point Of Contact at originator. */
  56.     private String originatorAddress;

  57.     /** Creating agency or operator. */
  58.     private String techOrg;

  59.     /** Technical Point Of Contact at originator. */
  60.     private String techPOC;

  61.     /** Position of Technical Point Of Contact at originator. */
  62.     private String techPosition;

  63.     /** Phone number of Technical Point Of Contact at originator. */
  64.     private String techPhone;

  65.     /** Email address of Technical Point Of Contact at originator.
  66.      * @since 11.2
  67.      */
  68.     private String techEmail;

  69.     /** Address of Technical Point Of Contact at originator. */
  70.     private String techAddress;

  71.     /** Unique ID identifying previous message from a given originator. */
  72.     private String previousMessageID;

  73.     /** Unique ID identifying next message from a given originator. */
  74.     private String nextMessageID;

  75.     /** Unique identifier of Attitude Data Message linked to this Orbit Data Message. */
  76.     private String admMessageLink;

  77.     /** Unique identifier of Conjunction Data Message linked to this Orbit Data Message. */
  78.     private String cdmMessageLink;

  79.     /** Unique identifier of Pointing Request Message linked to this Orbit Data Message. */
  80.     private String prmMessageLink;

  81.     /** Unique identifier of Reentry Data Messages linked to this Orbit Data Message. */
  82.     private String rdmMessageLink;

  83.     /** Unique identifier of Tracking Data Messages linked to this Orbit Data Message. */
  84.     private String tdmMessageLink;

  85.     /** Operator of the space object. */
  86.     private String operator;

  87.     /** Owner of the space object. */
  88.     private String owner;

  89.     /** Name of the country where the space object owner is based. */
  90.     private String country;

  91.     /** Name of the constellation this space object belongs to. */
  92.     private String constellation;

  93.     /** Type of object. */
  94.     private ObjectType objectType;

  95.     /** Epoch to which <em>all</em> relative times are referenced in data blocks;
  96.      * unless overridden by block-specific {@code EPOCH_TZERO} values. */
  97.     private AbsoluteDate epochT0;

  98.     /** Operational status. */
  99.     private OpsStatus opsStatus;

  100.     /** Orbit category. */
  101.     private OrbitCategory orbitCategory;

  102.     /** List of elements of information data blocks included in this message. */
  103.     private List<OcmElements> ocmDataElements;

  104.     /** Spacecraft clock count at {@link #getEpochT0()}. */
  105.     private double sclkOffsetAtEpoch;

  106.     /** Number of spacecraft clock seconds occurring during one SI second. */
  107.     private double sclkSecPerSISec;

  108.     /** Creation date of previous message from a given originator. */
  109.     private AbsoluteDate previousMessageEpoch;

  110.     /** Creation date of next message from a given originator. */
  111.     private AbsoluteDate nextMessageEpoch;

  112.     /** Time of the earliest data contained in the OCM. */
  113.     private AbsoluteDate startTime;

  114.     /** Time of the latest data contained in the OCM. */
  115.     private AbsoluteDate stopTime;

  116.     /** Span of time that the OCM covers. */
  117.     private double timeSpan;

  118.     /** Difference (TAI – UTC) in seconds at epoch {@link #epochT0}. */
  119.     private double taimutcT0;

  120.     /** Epoch of next leap second.
  121.      * @since 11.2
  122.      */
  123.     private AbsoluteDate nextLeapEpoch;

  124.     /** Difference (TAI – UTC) in seconds incorporated at {@link #nextLeapEpoch}.
  125.      * @since 11.2
  126.      */
  127.     private double nextLeapTaimutc;

  128.     /** Difference (UT1 – UTC) in seconds at epoch {@link #epochT0}. */
  129.     private double ut1mutcT0;

  130.     /** Source and version of Earth Orientation Parameters. */
  131.     private String eopSource;

  132.     /** Interpolation method for Earth Orientation Parameters. */
  133.     private String interpMethodEOP;

  134.     /** Source and version of celestial body (e.g. Sun/Earth/Planetary). */
  135.     private String celestialSource;

  136.     /** Data context.
  137.      * @since 12.0
  138.      */
  139.     private final DataContext dataContext;

  140.     /** Create a new meta-data.
  141.      * @param dataContext data context
  142.      */
  143.     public OcmMetadata(final DataContext dataContext) {

  144.         // set up the few fields that have default values as per CCSDS standard
  145.         super(TimeSystem.UTC);
  146.         sclkOffsetAtEpoch = DEFAULT_SCLK_OFFSET_AT_EPOCH;
  147.         sclkSecPerSISec   = DEFAULT_SCLK_SEC_PER_SI_SEC;
  148.         timeSpan          = Double.NaN;
  149.         taimutcT0         = Double.NaN;
  150.         ut1mutcT0         = Double.NaN;
  151.         nextLeapTaimutc   = Double.NaN;
  152.         this.dataContext  = dataContext;

  153.     }

  154.     /** {@inheritDoc} */
  155.     @Override
  156.     public void validate(final double version) {
  157.         // we don't call super.checkMandatoryEntries() because
  158.         // all of the parameters considered mandatory at ODM level
  159.         // for OPM, OMM and OEM are in fact optional in OCM
  160.         // only TIME_SYSTEM and EPOCH_TZERO are mandatory
  161.         checkNotNull(getTimeSystem(), MetadataKey.TIME_SYSTEM.name());
  162.         checkNotNull(epochT0,         OcmMetadataKey.EPOCH_TZERO.name());
  163.         if (nextLeapEpoch != null) {
  164.             checkNotNaN(nextLeapTaimutc, OcmMetadataKey.NEXT_LEAP_TAIMUTC.name());
  165.         }
  166.     }

  167.     /** Get the international designator for the object.
  168.      * @return international designator for the object
  169.      */
  170.     public String getInternationalDesignator() {
  171.         return internationalDesignator;
  172.     }

  173.     /** Set the international designator for the object.
  174.      * @param internationalDesignator international designator for the object
  175.      */
  176.     public void setInternationalDesignator(final String internationalDesignator) {
  177.         refuseFurtherComments();
  178.         this.internationalDesignator = internationalDesignator;
  179.     }

  180.     /** Get the specification of satellite catalog source.
  181.      * @return specification of satellite catalog source
  182.      */
  183.     public String getCatalogName() {
  184.         return catalogName;
  185.     }

  186.     /** Set the specification of satellite catalog source.
  187.      * @param catalogName specification of satellite catalog source
  188.      */
  189.     public void setCatalogName(final String catalogName) {
  190.         refuseFurtherComments();
  191.         this.catalogName = catalogName;
  192.     }

  193.     /** Get the unique satellite identification designator for the object.
  194.      * @return unique satellite identification designator for the object.
  195.      */
  196.     public String getObjectDesignator() {
  197.         return objectDesignator;
  198.     }

  199.     /** Set the unique satellite identification designator for the object.
  200.      * @param objectDesignator unique satellite identification designator for the object
  201.      */
  202.     public void setObjectDesignator(final String objectDesignator) {
  203.         refuseFurtherComments();
  204.         this.objectDesignator = objectDesignator;
  205.     }

  206.     /** Get the alternate names for this space object.
  207.      * @return alternate names
  208.      */
  209.     public List<String> getAlternateNames() {
  210.         return alternateNames;
  211.     }

  212.     /** Set the alternate names for this space object.
  213.      * @param alternateNames alternate names
  214.      */
  215.     public void setAlternateNames(final List<String> alternateNames) {
  216.         refuseFurtherComments();
  217.         this.alternateNames = alternateNames;
  218.     }

  219.     /** Get the programmatic Point Of Contact at originator.
  220.      * @return programmatic Point Of Contact at originator
  221.      */
  222.     public String getOriginatorPOC() {
  223.         return originatorPOC;
  224.     }

  225.     /** Set the programmatic Point Of Contact at originator.
  226.      * @param originatorPOC programmatic Point Of Contact at originator
  227.      */
  228.     public void setOriginatorPOC(final String originatorPOC) {
  229.         refuseFurtherComments();
  230.         this.originatorPOC = originatorPOC;
  231.     }

  232.     /** Get the position of Programmatic Point Of Contact at originator.
  233.      * @return position of Programmatic Point Of Contact at originator
  234.      */
  235.     public String getOriginatorPosition() {
  236.         return originatorPosition;
  237.     }

  238.     /** Set the position of Programmatic Point Of Contact at originator.
  239.      * @param originatorPosition position of Programmatic Point Of Contact at originator
  240.      */
  241.     public void setOriginatorPosition(final String originatorPosition) {
  242.         refuseFurtherComments();
  243.         this.originatorPosition = originatorPosition;
  244.     }

  245.     /** Get the phone number of Programmatic Point Of Contact at originator.
  246.      * @return phone number of Programmatic Point Of Contact at originator
  247.      */
  248.     public String getOriginatorPhone() {
  249.         return originatorPhone;
  250.     }

  251.     /** Set the phone number of Programmatic Point Of Contact at originator.
  252.      * @param originatorPhone phone number of Programmatic Point Of Contact at originator
  253.      */
  254.     public void setOriginatorPhone(final String originatorPhone) {
  255.         refuseFurtherComments();
  256.         this.originatorPhone = originatorPhone;
  257.     }

  258.     /** Get the email address of Programmatic Point Of Contact at originator.
  259.      * @return email address of Programmatic Point Of Contact at originator
  260.      * @since 11.2
  261.      */
  262.     public String getOriginatorEmail() {
  263.         return originatorEmail;
  264.     }

  265.     /** Set the email address of Programmatic Point Of Contact at originator.
  266.      * @param originatorEmail email address of Programmatic Point Of Contact at originator
  267.      * @since 11.2
  268.      */
  269.     public void setOriginatorEmail(final String originatorEmail) {
  270.         refuseFurtherComments();
  271.         this.originatorEmail = originatorEmail;
  272.     }

  273.     /** Get the address of Programmatic Point Of Contact at originator.
  274.      * @return address of Programmatic Point Of Contact at originator
  275.      */
  276.     public String getOriginatorAddress() {
  277.         return originatorAddress;
  278.     }

  279.     /** Set the address of Programmatic Point Of Contact at originator.
  280.      * @param originatorAddress address of Programmatic Point Of Contact at originator
  281.      */
  282.     public void setOriginatorAddress(final String originatorAddress) {
  283.         refuseFurtherComments();
  284.         this.originatorAddress = originatorAddress;
  285.     }

  286.     /** Get the creating agency or operator.
  287.      * @return creating agency or operator
  288.      */
  289.     public String getTechOrg() {
  290.         return techOrg;
  291.     }

  292.     /** Set the creating agency or operator.
  293.      * @param techOrg creating agency or operator
  294.      */
  295.     public void setTechOrg(final String techOrg) {
  296.         refuseFurtherComments();
  297.         this.techOrg = techOrg;
  298.     }

  299.     /** Get the Technical Point Of Contact at originator.
  300.      * @return Technical Point Of Contact at originator
  301.      */
  302.     public String getTechPOC() {
  303.         return techPOC;
  304.     }

  305.     /** Set the Technical Point Of Contact at originator.
  306.      * @param techPOC Technical Point Of Contact at originator
  307.      */
  308.     public void setTechPOC(final String techPOC) {
  309.         refuseFurtherComments();
  310.         this.techPOC = techPOC;
  311.     }

  312.     /** Get the position of Technical Point Of Contact at originator.
  313.      * @return position of Technical Point Of Contact at originator
  314.      */
  315.     public String getTechPosition() {
  316.         return techPosition;
  317.     }

  318.     /** Set the position of Technical Point Of Contact at originator.
  319.      * @param techPosition position of Technical Point Of Contact at originator
  320.      */
  321.     public void setTechPosition(final String techPosition) {
  322.         refuseFurtherComments();
  323.         this.techPosition = techPosition;
  324.     }

  325.     /** Get the phone number of Technical Point Of Contact at originator.
  326.      * @return phone number of Technical Point Of Contact at originator
  327.      */
  328.     public String getTechPhone() {
  329.         return techPhone;
  330.     }

  331.     /** Set the phone number of Technical Point Of Contact at originator.
  332.      * @param techPhone phone number of Technical Point Of Contact at originator
  333.      */
  334.     public void setTechPhone(final String techPhone) {
  335.         refuseFurtherComments();
  336.         this.techPhone = techPhone;
  337.     }

  338.     /** Get the email address of Technical Point Of Contact at originator.
  339.      * @return email address of Technical Point Of Contact at originator
  340.      * @since 11.2
  341.      */
  342.     public String getTechEmail() {
  343.         return techEmail;
  344.     }

  345.     /** Set the email address of Technical Point Of Contact at originator.
  346.      * @param techEmail email address of Technical Point Of Contact at originator
  347.      * @since 11.2
  348.      */
  349.     public void setTechEmail(final String techEmail) {
  350.         refuseFurtherComments();
  351.         this.techEmail = techEmail;
  352.     }

  353.     /** Get the address of Technical Point Of Contact at originator.
  354.      * @return address of Technical Point Of Contact at originator
  355.      */
  356.     public String getTechAddress() {
  357.         return techAddress;
  358.     }

  359.     /** Set the address of Technical Point Of Contact at originator.
  360.      * @param techAddress address of Technical Point Of Contact at originator
  361.      */
  362.     public void setTechAddress(final String techAddress) {
  363.         refuseFurtherComments();
  364.         this.techAddress = techAddress;
  365.     }

  366.     /** Get the unique ID identifying previous message from a given originator.
  367.      * @return unique ID identifying previous message from a given originator
  368.      */
  369.     public String getPreviousMessageID() {
  370.         return previousMessageID;
  371.     }

  372.     /** Set the unique ID identifying previous message from a given originator.
  373.      * @param previousMessageID unique ID identifying previous message from a given originator
  374.      */
  375.     public void setPreviousMessageID(final String previousMessageID) {
  376.         refuseFurtherComments();
  377.         this.previousMessageID = previousMessageID;
  378.     }

  379.     /** Get the unique ID identifying next message from a given originator.
  380.      * @return unique ID identifying next message from a given originator
  381.      */
  382.     public String getNextMessageID() {
  383.         return nextMessageID;
  384.     }

  385.     /** Set the unique ID identifying next message from a given originator.
  386.      * @param nextMessageID unique ID identifying next message from a given originator
  387.      */
  388.     public void setNextMessageID(final String nextMessageID) {
  389.         refuseFurtherComments();
  390.         this.nextMessageID = nextMessageID;
  391.     }

  392.     /** Get the Unique identifier of Attitude Data Message linked to this Orbit Data Message.
  393.      * @return Unique identifier of Attitude Data Message linked to this Orbit Data Message
  394.      */
  395.     public String getAdmMessageLink() {
  396.         return admMessageLink;
  397.     }

  398.     /** Set the Unique identifier of Attitude Data Message linked to this Orbit Data Message.
  399.      * @param admMessageLink Unique identifier of Attitude Data Message linked to this Orbit Data Message
  400.      */
  401.     public void setAdmMessageLink(final String admMessageLink) {
  402.         refuseFurtherComments();
  403.         this.admMessageLink = admMessageLink;
  404.     }

  405.     /** Get the Unique identifier of Conjunction Data Message linked to this Orbit Data Message.
  406.      * @return Unique identifier of Conjunction Data Message linked to this Orbit Data Message
  407.      */
  408.     public String getCdmMessageLink() {
  409.         return cdmMessageLink;
  410.     }

  411.     /** Set the Unique identifier of Conjunction Data Message linked to this Orbit Data Message.
  412.      * @param cdmMessageLink Unique identifier of Conjunction Data Message linked to this Orbit Data Message
  413.      */
  414.     public void setCdmMessageLink(final String cdmMessageLink) {
  415.         refuseFurtherComments();
  416.         this.cdmMessageLink = cdmMessageLink;
  417.     }

  418.     /** Get the Unique identifier of Pointing Request Message linked to this Orbit Data Message.
  419.      * @return Unique identifier of Pointing Request Message linked to this Orbit Data Message
  420.      */
  421.     public String getPrmMessageLink() {
  422.         return prmMessageLink;
  423.     }

  424.     /** Set the Unique identifier of Pointing Request Message linked to this Orbit Data Message.
  425.      * @param prmMessageLink Unique identifier of Pointing Request Message linked to this Orbit Data Message
  426.      */
  427.     public void setPrmMessageLink(final String prmMessageLink) {
  428.         refuseFurtherComments();
  429.         this.prmMessageLink = prmMessageLink;
  430.     }

  431.     /** Get the Unique identifier of Reentry Data Message linked to this Orbit Data Message.
  432.      * @return Unique identifier of Reentry Data Message linked to this Orbit Data Message
  433.      */
  434.     public String getRdmMessageLink() {
  435.         return rdmMessageLink;
  436.     }

  437.     /** Set the Unique identifier of Reentry Data Message linked to this Orbit Data Message.
  438.      * @param rdmMessageLink Unique identifier of Reentry Data Message linked to this Orbit Data Message
  439.      */
  440.     public void setRdmMessageLink(final String rdmMessageLink) {
  441.         refuseFurtherComments();
  442.         this.rdmMessageLink = rdmMessageLink;
  443.     }

  444.     /** Get the Unique identifier of Tracking Data Message linked to this Orbit Data Message.
  445.      * @return Unique identifier of Tracking Data Message linked to this Orbit Data Message
  446.      */
  447.     public String getTdmMessageLink() {
  448.         return tdmMessageLink;
  449.     }

  450.     /** Set the Unique identifier of Tracking Data Message linked to this Orbit Data Message.
  451.      * @param tdmMessageLink Unique identifier of Tracking Data Message linked to this Orbit Data Message
  452.      */
  453.     public void setTdmMessageLink(final String tdmMessageLink) {
  454.         refuseFurtherComments();
  455.         this.tdmMessageLink = tdmMessageLink;
  456.     }

  457.     /** Get the operator of the space object.
  458.      * @return operator of the space object
  459.      */
  460.     public String getOperator() {
  461.         return operator;
  462.     }

  463.     /** Set the operator of the space object.
  464.      * @param operator operator of the space object
  465.      */
  466.     public void setOperator(final String operator) {
  467.         refuseFurtherComments();
  468.         this.operator = operator;
  469.     }

  470.     /** Get the owner of the space object.
  471.      * @return owner of the space object
  472.      */
  473.     public String getOwner() {
  474.         return owner;
  475.     }

  476.     /** Set the owner of the space object.
  477.      * @param owner owner of the space object
  478.      */
  479.     public void setOwner(final String owner) {
  480.         refuseFurtherComments();
  481.         this.owner = owner;
  482.     }

  483.     /** Get the name of the country where the space object owner is based.
  484.      * @return name of the country where the space object owner is based
  485.      */
  486.     public String getCountry() {
  487.         return country;
  488.     }

  489.     /** Set the name of the country where the space object owner is based.
  490.      * @param country name of the country where the space object owner is based
  491.      */
  492.     public void setCountry(final String country) {
  493.         refuseFurtherComments();
  494.         this.country = country;
  495.     }

  496.     /** Get the name of the constellation this space object belongs to.
  497.      * @return name of the constellation this space object belongs to
  498.      */
  499.     public String getConstellation() {
  500.         return constellation;
  501.     }

  502.     /** Set the name of the constellation this space object belongs to.
  503.      * @param constellation name of the constellation this space object belongs to
  504.      */
  505.     public void setConstellation(final String constellation) {
  506.         refuseFurtherComments();
  507.         this.constellation = constellation;
  508.     }

  509.     /** Get the type of object.
  510.      * @return type of object
  511.      */
  512.     public ObjectType getObjectType() {
  513.         return objectType;
  514.     }

  515.     /** Set the type of object.
  516.      * @param objectType type of object
  517.      */
  518.     public void setObjectType(final ObjectType objectType) {
  519.         refuseFurtherComments();
  520.         this.objectType = objectType;
  521.     }

  522.     /** Get the epoch to which <em>all</em> relative times are referenced in data blocks.
  523.      * @return epoch to which <em>all</em> relative times are referenced in data blocks
  524.      */
  525.     public AbsoluteDate getEpochT0() {
  526.         return epochT0;
  527.     }

  528.     /** Set the epoch to which <em>all</em> relative times are referenced in data blocks.
  529.      * @param epochT0 epoch to which <em>all</em> relative times are referenced in data blocks
  530.      */
  531.     public void setEpochT0(final AbsoluteDate epochT0) {
  532.         refuseFurtherComments();
  533.         this.epochT0 = epochT0;
  534.     }

  535.     /** Get the operational status.
  536.      * @return operational status
  537.      */
  538.     public OpsStatus getOpsStatus() {
  539.         return opsStatus;
  540.     }

  541.     /** Set the operational status.
  542.      * @param opsStatus operational status
  543.      */
  544.     public void setOpsStatus(final OpsStatus opsStatus) {
  545.         refuseFurtherComments();
  546.         this.opsStatus = opsStatus;
  547.     }

  548.     /** Get the orbit category.
  549.      * @return orbit category
  550.      */
  551.     public OrbitCategory getOrbitCategory() {
  552.         return orbitCategory;
  553.     }

  554.     /** Set the orbit category.
  555.      * @param orbitCategory orbit category
  556.      */
  557.     public void setOrbitCategory(final OrbitCategory orbitCategory) {
  558.         refuseFurtherComments();
  559.         this.orbitCategory = orbitCategory;
  560.     }

  561.     /** Get the list of elements of information data blocks included in this message.
  562.      * @return list of elements of information data blocks included in this message
  563.      */
  564.     public List<OcmElements> getOcmDataElements() {
  565.         return ocmDataElements;
  566.     }

  567.     /** Set the list of elements of information data blocks included in this message.
  568.      * @param ocmDataElements list of elements of information data blocks included in this message
  569.      */
  570.     public void setOcmDataElements(final List<OcmElements> ocmDataElements) {
  571.         refuseFurtherComments();
  572.         this.ocmDataElements = ocmDataElements;
  573.     }

  574.     /** Get the spacecraft clock count at {@link #getEpochT0()}.
  575.      * @return spacecraft clock count at {@link #getEpochT0()}
  576.      */
  577.     public double getSclkOffsetAtEpoch() {
  578.         return sclkOffsetAtEpoch;
  579.     }

  580.     /** Set the spacecraft clock count at {@link #getEpochT0()}.
  581.      * @param sclkOffsetAtEpoch spacecraft clock count at {@link #getEpochT0()}
  582.      */
  583.     public void setSclkOffsetAtEpoch(final double sclkOffsetAtEpoch) {
  584.         refuseFurtherComments();
  585.         this.sclkOffsetAtEpoch = sclkOffsetAtEpoch;
  586.     }

  587.     /** Get the number of spacecraft clock seconds occurring during one SI second.
  588.      * @return number of spacecraft clock seconds occurring during one SI second
  589.      */
  590.     public double getSclkSecPerSISec() {
  591.         return sclkSecPerSISec;
  592.     }

  593.     /** Set the number of spacecraft clock seconds occurring during one SI second.
  594.      * @param secClockPerSISec number of spacecraft clock seconds occurring during one SI second
  595.      */
  596.     public void setSclkSecPerSISec(final double secClockPerSISec) {
  597.         refuseFurtherComments();
  598.         this.sclkSecPerSISec = secClockPerSISec;
  599.     }

  600.     /** Get the creation date of previous message from a given originator.
  601.      * @return creation date of previous message from a given originator
  602.      */
  603.     public AbsoluteDate getPreviousMessageEpoch() {
  604.         return previousMessageEpoch;
  605.     }

  606.     /** Set the creation date of previous message from a given originator.
  607.      * @param previousMessageEpoch creation date of previous message from a given originator
  608.      */
  609.     public void setPreviousMessageEpoch(final AbsoluteDate previousMessageEpoch) {
  610.         refuseFurtherComments();
  611.         this.previousMessageEpoch = previousMessageEpoch;
  612.     }

  613.     /** Get the creation date of next message from a given originator.
  614.      * @return creation date of next message from a given originator
  615.      */
  616.     public AbsoluteDate getNextMessageEpoch() {
  617.         return nextMessageEpoch;
  618.     }

  619.     /** Set the creation date of next message from a given originator.
  620.      * @param nextMessageEpoch creation date of next message from a given originator
  621.      */
  622.     public void setNextMessageEpoch(final AbsoluteDate nextMessageEpoch) {
  623.         refuseFurtherComments();
  624.         this.nextMessageEpoch = nextMessageEpoch;
  625.     }

  626.     /** Get the time of the earliest data contained in the OCM.
  627.      * @return time of the earliest data contained in the OCM
  628.      */
  629.     public AbsoluteDate getStartTime() {
  630.         return startTime;
  631.     }

  632.     /** Set the time of the earliest data contained in the OCM.
  633.      * @param startTime time of the earliest data contained in the OCM
  634.      */
  635.     public void setStartTime(final AbsoluteDate startTime) {
  636.         refuseFurtherComments();
  637.         this.startTime = startTime;
  638.     }

  639.     /** Get the time of the latest data contained in the OCM.
  640.      * @return time of the latest data contained in the OCM
  641.      */
  642.     public AbsoluteDate getStopTime() {
  643.         return stopTime;
  644.     }

  645.     /** Set the time of the latest data contained in the OCM.
  646.      * @param stopTime time of the latest data contained in the OCM
  647.      */
  648.     public void setStopTime(final AbsoluteDate stopTime) {
  649.         refuseFurtherComments();
  650.         this.stopTime = stopTime;
  651.     }

  652.     /** Get the span of time in seconds that the OCM covers.
  653.      * @return span of time in seconds that the OCM covers
  654.      */
  655.     public double getTimeSpan() {
  656.         return timeSpan;
  657.     }

  658.     /** Set the span of time in seconds that the OCM covers.
  659.      * @param timeSpan span of time in seconds that the OCM covers
  660.      */
  661.     public void setTimeSpan(final double timeSpan) {
  662.         refuseFurtherComments();
  663.         this.timeSpan = timeSpan;
  664.     }

  665.     /** Get the difference (TAI – UTC) in seconds at epoch {@link #getEpochT0()}.
  666.      * @return difference (TAI – UTC) in seconds at epoch {@link #getEpochT0()}
  667.      */
  668.     public double getTaimutcT0() {
  669.         return taimutcT0;
  670.     }

  671.     /** Set the difference (TAI – UTC) in seconds at epoch {@link #getEpochT0()}.
  672.      * @param taimutcT0 difference (TAI – UTC) in seconds at epoch {@link #getEpochT0()}
  673.      */
  674.     public void setTaimutcT0(final double taimutcT0) {
  675.         refuseFurtherComments();
  676.         this.taimutcT0 = taimutcT0;
  677.     }

  678.     /** Get the epoch of next leap second.
  679.      * @return epoch of next leap second
  680.      * @since 11.2
  681.      */
  682.     public AbsoluteDate getNextLeapEpoch() {
  683.         return nextLeapEpoch;
  684.     }

  685.     /** Set the epoch of next leap second.
  686.      * @param nextLeapEpoch epoch of next leap second
  687.      * @since 11.2
  688.      */
  689.     public void setNextLeapEpoch(final AbsoluteDate nextLeapEpoch) {
  690.         refuseFurtherComments();
  691.         this.nextLeapEpoch = nextLeapEpoch;
  692.     }

  693.     /** Get the difference (TAI – UTC) in seconds incorporated at epoch {@link #getNextLeapEpoch()}.
  694.      * @return difference (TAI – UTC) in seconds incorporated at epoch {@link #getNextLeapEpoch()}
  695.      * @since 11.2
  696.      */
  697.     public double getNextLeapTaimutc() {
  698.         return nextLeapTaimutc;
  699.     }

  700.     /** Set the difference (TAI – UTC) in seconds incorporated at epoch {@link #getNextLeapEpoch()}.
  701.      * @param nextLeapTaimutc difference (TAI – UTC) in seconds incorporated at epoch {@link #getNextLeapEpoch()}
  702.      * @since 11.2
  703.      */
  704.     public void setNextLeapTaimutc(final double nextLeapTaimutc) {
  705.         refuseFurtherComments();
  706.         this.nextLeapTaimutc = nextLeapTaimutc;
  707.     }

  708.     /** Get the difference (UT1 – UTC) in seconds at epoch {@link #getEpochT0()}.
  709.      * @return difference (UT1 – UTC) in seconds at epoch {@link #getEpochT0()}
  710.      */
  711.     public double getUt1mutcT0() {
  712.         return ut1mutcT0;
  713.     }

  714.     /** Set the difference (UT1 – UTC) in seconds at epoch {@link #getEpochT0()}.
  715.      * @param ut1mutcT0 difference (UT1 – UTC) in seconds at epoch {@link #getEpochT0()}
  716.      */
  717.     public void setUt1mutcT0(final double ut1mutcT0) {
  718.         refuseFurtherComments();
  719.         this.ut1mutcT0 = ut1mutcT0;
  720.     }

  721.     /** Get the source and version of Earth Orientation Parameters.
  722.      * @return source and version of Earth Orientation Parameters
  723.      */
  724.     public String getEopSource() {
  725.         return eopSource;
  726.     }

  727.     /** Set the source and version of Earth Orientation Parameters.
  728.      * @param eopSource source and version of Earth Orientation Parameters
  729.      */
  730.     public void setEopSource(final String eopSource) {
  731.         refuseFurtherComments();
  732.         this.eopSource = eopSource;
  733.     }

  734.     /** Get the interpolation method for Earth Orientation Parameters.
  735.      * @return interpolation method for Earth Orientation Parameters
  736.      */
  737.     public String getInterpMethodEOP() {
  738.         return interpMethodEOP;
  739.     }

  740.     /** Set the interpolation method for Earth Orientation Parameters.
  741.      * @param interpMethodEOP interpolation method for Earth Orientation Parameters
  742.      */
  743.     public void setInterpMethodEOP(final String interpMethodEOP) {
  744.         refuseFurtherComments();
  745.         this.interpMethodEOP = interpMethodEOP;
  746.     }

  747.     /** Get the source and version of celestial body (e.g. Sun/Earth/Planetary).
  748.      * @return source and version of celestial body (e.g. Sun/Earth/Planetary)
  749.      */
  750.     public String getCelestialSource() {
  751.         return celestialSource;
  752.     }

  753.     /** Set the source and version of celestial body (e.g. Sun/Earth/Planetary).
  754.      * @param celestialSource source and version of celestial body (e.g. Sun/Earth/Planetary)
  755.      */
  756.     public void setCelestialSource(final String celestialSource) {
  757.         refuseFurtherComments();
  758.         this.celestialSource = celestialSource;
  759.     }

  760.     /** Copy the instance, making sure mandatory fields have been initialized.
  761.      * <p>
  762.      * Message ID, previous/next references, start and stop times are not copied.
  763.      * </p>
  764.      * @param version format version
  765.      * @return a new copy
  766.      * @since 12.0
  767.      */
  768.     public OcmMetadata copy(final double version) {

  769.         validate(version);

  770.         // allocate new instance
  771.         final OcmMetadata copy = new OcmMetadata(dataContext);

  772.         // copy comments
  773.         for (String comment : getComments()) {
  774.             copy.addComment(comment);
  775.         }

  776.         // copy metadata
  777.         copy.setInternationalDesignator(getInternationalDesignator());
  778.         copy.setCatalogName(getCatalogName());
  779.         copy.setObjectDesignator(getObjectDesignator());
  780.         copy.setAlternateNames(getAlternateNames());
  781.         copy.setOriginatorPOC(getOriginatorPOC());
  782.         copy.setOriginatorPosition(getOriginatorPosition());
  783.         copy.setOriginatorPhone(getOriginatorPhone());
  784.         copy.setOriginatorEmail(getOriginatorEmail());
  785.         copy.setOriginatorAddress(getOriginatorAddress());
  786.         copy.setTechOrg(getTechOrg());
  787.         copy.setTechPOC(getTechPOC());
  788.         copy.setTechPosition(getTechPosition());
  789.         copy.setTechPhone(getTechPhone());
  790.         copy.setTechEmail(getTechEmail());
  791.         copy.setTechAddress(getTechAddress());
  792.         copy.setAdmMessageLink(getAdmMessageLink());
  793.         copy.setCdmMessageLink(getCdmMessageLink());
  794.         copy.setPrmMessageLink(getPrmMessageLink());
  795.         copy.setRdmMessageLink(getRdmMessageLink());
  796.         copy.setTdmMessageLink(getTdmMessageLink());
  797.         copy.setOperator(getOperator());
  798.         copy.setOwner(getOwner());
  799.         copy.setCountry(getCountry());
  800.         copy.setConstellation(getConstellation());
  801.         copy.setObjectType(getObjectType());
  802.         copy.setEpochT0(getEpochT0());
  803.         copy.setOpsStatus(getOpsStatus());
  804.         copy.setOrbitCategory(getOrbitCategory());
  805.         copy.setOcmDataElements(getOcmDataElements());
  806.         copy.setSclkOffsetAtEpoch(getSclkOffsetAtEpoch());
  807.         copy.setSclkSecPerSISec(getSclkSecPerSISec());
  808.         copy.setTaimutcT0(getTaimutcT0());
  809.         copy.setNextLeapEpoch(getNextLeapEpoch());
  810.         copy.setNextLeapTaimutc(getNextLeapTaimutc());
  811.         copy.setUt1mutcT0(getUt1mutcT0());
  812.         copy.setEopSource(getEopSource());
  813.         copy.setInterpMethodEOP(getInterpMethodEOP());
  814.         copy.setCelestialSource(getCelestialSource());

  815.         return copy;

  816.     }

  817. }