TdmMetadata.java

  1. /* Copyright 2002-2024 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.tdm;

  18. import java.util.ArrayList;
  19. import java.util.List;
  20. import java.util.Map;
  21. import java.util.TreeMap;

  22. import org.orekit.errors.OrekitException;
  23. import org.orekit.errors.OrekitMessages;
  24. import org.orekit.files.ccsds.definitions.FrameFacade;
  25. import org.orekit.files.ccsds.section.Metadata;
  26. import org.orekit.frames.Frame;
  27. import org.orekit.time.AbsoluteDate;
  28. import org.orekit.utils.Constants;

  29. /** The TDMMetadata class gathers the meta-data present in the Tracking Data Message (TDM).<p>
  30.  *  References:<p>
  31.  *  <a href="https://public.ccsds.org/Pubs/503x0b1c1.pdf">CCSDS 503.0-B-1 recommended standard</a>. §3.3 ("Tracking Data Message", Blue Book, Version 1.0, November 2007).
  32.  *
  33.  * @author Maxime Journot
  34.  * @since 9.0
  35.  */
  36. public class TdmMetadata extends Metadata {

  37.     /** Identifier for the tracking data. */
  38.     private String trackId;

  39.     /** List of data types in the data section. */
  40.     private List<ObservationType> dataTypes;

  41.     /** Start epoch of total time span covered by observations block. */
  42.     private AbsoluteDate startTime;

  43.     /** End epoch of total time span covered by observations block. */
  44.     private AbsoluteDate stopTime;

  45.     /** Map of participants in the tracking data session (minimum 1 and up to 5).<p>
  46.      *  Participants may include ground stations, spacecraft, and/or quasars.<p>
  47.      *  Participants represent the classical transmitting parties, transponding parties, and receiving parties.
  48.      */
  49.     private Map<Integer, String> participants;

  50.     /** Tracking mode. */
  51.     private TrackingMode mode;

  52.     /** The path shall reflect the signal path by listing the index of each participant
  53.      *  in order, separated by commas, with no inserted white space.<p>
  54.      *  The integers 1, 2, 3, 4, 5 used to specify the signal path correlate
  55.      *  with the indices of the PARTICIPANT keywords.<p>
  56.      *  The first entry in the PATH shall be the transmit participant.<p>
  57.      *  The non-indexed ‘PATH’ keyword shall be used if the MODE is ‘SEQUENTIAL’.<p>
  58.      *  The indexed ‘PATH_1’ and ‘PATH_2’ keywords shall be used where the MODE is ‘SINGLE_DIFF’.
  59.      */
  60.     private int[] path;

  61.     /** Path 1 (see above). */
  62.     private int[] path1;

  63.     /** Path 2 (see above). */
  64.     private int[] path2;

  65.     /** Map of external ephemeris names for participants (minimum 1 and up to 5). */
  66.     private Map<Integer, String> ephemerisNames;

  67.     /** Frequency band for transmitted frequencies. */
  68.     private String transmitBand;

  69.     /** Frequency band for received frequencies. */
  70.     private String receiveBand;

  71.     /** Turn-around ratio numerator.<p>
  72.      *  Numerator of the turn-around ratio that is necessary to calculate the coherent downlink from the uplink frequency.
  73.      */
  74.     private int turnaroundNumerator;

  75.     /** Turn-around ratio denominator .*/
  76.     private int turnaroundDenominator;

  77.     /** Timetag reference.<p>
  78.      *  Provides a reference for time tags in the tracking data.<p>
  79.      *  It indicates whether the timetag associated with the data is the transmit time or the receive time.
  80.      */
  81.     private TimetagReference timetagRef;

  82.     /** Integration interval. <p>
  83.      *  Provides the Doppler count time in seconds for Doppler data or for the creation
  84.      *  of normal points.
  85.      */
  86.     private double integrationInterval;

  87.     /** Integration reference.<p>
  88.      *  Used in conjunction with timetag reference and integration interval.<p>
  89.      *  Indicates whether the timetag represents the start, middle or end of the integration interval.
  90.      */
  91.     private IntegrationReference integrationRef;

  92.     /** Frequency offset.<p>
  93.      *  A frequency in Hz that must be added to every RECEIVE_FREQ to reconstruct it.
  94.      */
  95.     private double freqOffset;

  96.     /** Range mode. */
  97.     private RangeMode rangeMode;

  98.     /** Raw range modulus (in RangeUnits). */
  99.     private double rawRangeModulus;

  100.     /** Range units. */
  101.     private RangeUnits rangeUnits;

  102.     /** Angle type. */
  103.     private AngleType angleType;

  104.     /** Reference frame in which data are given: used in combination with ANGLE_TYPE=RADEC. */
  105.     private FrameFacade referenceFrame;

  106.     /** The interpolation method to be used. */
  107.     private String interpolationMethod;

  108.     /** The interpolation degree. */
  109.     private int interpolationDegree;

  110.     /** Bias that was added to Doppler count in the data section. */
  111.     private double doppplerCountBias;

  112.     /** Scaled by which Doppler count was multiplied in the data section. */
  113.     private double dopplerCountScale;

  114.     /** Indicator for occurred rollover in Doppler count. */
  115.     private boolean doppplerCountRollover;

  116.     /** Transmit delays map.<p>
  117.      *  Specifies a fixed interval of time, in seconds, for the signal to travel from the transmitting
  118.      *  electronics to the transmit point. Each item in the list corresponds to the each participants.
  119.      */
  120.     private Map<Integer, Double> transmitDelays;

  121.     /** Receive delays list.<p>
  122.      *  Specifies a fixed interval of time, in seconds, for the signal to travel from the tracking
  123.      *  point to the receiving electronics. Each item in the list corresponds to the each participants.
  124.      */
  125.     private Map<Integer, Double> receiveDelays;

  126.     /** Data quality. */
  127.     private DataQuality dataQuality;

  128.     /** Correction angle 1.<p>
  129.      *  Angle correction that has been added or should be added to the ANGLE_1 data.
  130.      */
  131.     private double correctionAngle1;

  132.     /** Correction angle 2.<p>
  133.      *  Angle correction that has been added or should be added to the ANGLE_2 data.
  134.      */
  135.     private double correctionAngle2;

  136.     /** Correction Doppler.<p>
  137.      *  Doppler correction that has been added or should be added to the DOPPLER data.
  138.      */
  139.     private double correctionDoppler;

  140.     /** Correction magnitude.<p>
  141.      *  Magnitude correction that has been added or should be added to the MAGNITUDE data.
  142.      */
  143.     private double correctionMagnitude;

  144.     /** Raw correction Range in {@link #getRangeUnits()}.<p>
  145.      *  Range correction that has been added or should be added to the RANGE data.
  146.      */
  147.     private double rawCorrectionRange;

  148.     /** Correction radar cross section.<p>
  149.      *  Radar cross section correction that has been added or should be added to the RCS data.
  150.      */
  151.     private double correctionRcs;

  152.     /** Correction receive.<p>
  153.      *  Receive correction that has been added or should be added to the RECEIVE data.
  154.      */
  155.     private double correctionReceive;

  156.     /** Correction transmit.<p>
  157.      *  Transmit correction that has been added or should be added to the TRANSMIT data.
  158.      */
  159.     private double correctionTransmit;

  160.     /** Yearly aberration correction.<p>
  161.      *  Yearly correction that has been added or should be added to the ANGLE data.
  162.      */
  163.     private double correctionAberrationYearly;

  164.     /** Diurnal aberration correction.<p>
  165.      *  Diurnl correction that has been added or should be added to the ANGLE data.
  166.      */
  167.     private double correctionAberrationDiurnal;

  168.     /** Correction applied ? YES/NO<p>
  169.      *  Indicate whethers or not the values associated with the CORRECTION_* keywords have been
  170.      *  applied to the tracking data.
  171.      */
  172.     private CorrectionApplied correctionsApplied;

  173.     /** Create a new TDM meta-data.
  174.      */
  175.     public TdmMetadata() {
  176.         super(null);
  177.         participants          = new TreeMap<>();
  178.         ephemerisNames        = new TreeMap<>();
  179.         doppplerCountBias     = Double.NaN;
  180.         dopplerCountScale     = 1;
  181.         doppplerCountRollover = false;
  182.         transmitDelays        = new TreeMap<>();
  183.         receiveDelays         = new TreeMap<>();
  184.     }

  185.     /** {@inheritDoc} */
  186.     @Override
  187.     public void validate(final double version) {
  188.         super.validate(version);
  189.         if (participants.isEmpty()) {
  190.             throw new OrekitException(OrekitMessages.UNINITIALIZED_VALUE_FOR_KEY, TdmMetadataKey.PARTICIPANT_1);
  191.         }
  192.     }

  193.     /** Getter for the tracking data identifier.
  194.      * @return tracking data identifier
  195.      */
  196.     public String getTrackId() {
  197.         return trackId;
  198.     }

  199.     /** Setter for the tracking data identifier.
  200.      * @param trackId tracking data identifier
  201.      */
  202.     public void setTrackId(final String trackId) {
  203.         refuseFurtherComments();
  204.         this.trackId = trackId;
  205.     }

  206.     /** Getter for the data types in the data section.
  207.      * @return data types in the data section
  208.      */
  209.     public List<ObservationType> getDataTypes() {
  210.         return dataTypes;
  211.     }

  212.     /** Setter for the data types in the data section.
  213.      * @param dataTypes data types in the data section
  214.      */
  215.     public void setDataTypes(final List<ObservationType> dataTypes) {
  216.         refuseFurtherComments();
  217.         this.dataTypes = new ArrayList<>();
  218.         this.dataTypes.addAll(dataTypes);
  219.     }

  220.     /** Getter for the startTime.
  221.      * @return the startTime
  222.      */
  223.     public AbsoluteDate getStartTime() {
  224.         return startTime;
  225.     }

  226.     /** Setter for the startTime.
  227.      * @param startTime the startTime to set
  228.      */
  229.     public void setStartTime(final AbsoluteDate startTime) {
  230.         refuseFurtherComments();
  231.         this.startTime = startTime;
  232.     }

  233.     /** Getter for the stopTime.
  234.      * @return the stopTime
  235.      */
  236.     public AbsoluteDate getStopTime() {
  237.         return stopTime;
  238.     }

  239.     /** Setter for the stopTime.
  240.      * @param stopTime the stopTime to set
  241.      */
  242.     public void setStopTime(final AbsoluteDate stopTime) {
  243.         refuseFurtherComments();
  244.         this.stopTime = stopTime;
  245.     }

  246.     /** Getter for the participants.
  247.      * @return the participants
  248.      */
  249.     public Map<Integer, String> getParticipants() {
  250.         return participants;
  251.     }

  252.     /** Setter for the participants.
  253.      * @param participants the participants to set
  254.      */
  255.     public void setParticipants(final Map<Integer, String> participants) {
  256.         refuseFurtherComments();
  257.         this.participants = new TreeMap<Integer, String>();
  258.         this.participants.putAll(participants);
  259.     }

  260.     /** Adds a participant to the list.
  261.      * @param participantNumber the number of the participant to add
  262.      * @param participant the name of the participant to add
  263.      */
  264.     public void addParticipant(final int participantNumber, final String participant) {
  265.         refuseFurtherComments();
  266.         this.participants.put(participantNumber, participant);
  267.     }

  268.     /** Getter for the mode.
  269.      * @return the mode
  270.      */
  271.     public TrackingMode getMode() {
  272.         return mode;
  273.     }

  274.     /** Setter for the mode.
  275.      * @param mode the mode to set
  276.      */
  277.     public void setMode(final TrackingMode mode) {
  278.         refuseFurtherComments();
  279.         this.mode = mode;
  280.     }

  281.     /** Getter for the path.
  282.      * @return the path
  283.      */
  284.     public int[] getPath() {
  285.         return safeCopy(path);
  286.     }

  287.     /** Setter for the path.
  288.      * @param path the path to set
  289.      */
  290.     public void setPath(final int[] path) {
  291.         refuseFurtherComments();
  292.         this.path = safeCopy(path);
  293.     }

  294.     /** Getter for the path1.
  295.      * @return the path1
  296.      */
  297.     public int[] getPath1() {
  298.         return safeCopy(path1);
  299.     }

  300.     /** Setter for the path1.
  301.      * @param path1 the path1 to set
  302.      */
  303.     public void setPath1(final int[] path1) {
  304.         refuseFurtherComments();
  305.         this.path1 = safeCopy(path1);
  306.     }

  307.     /** Getter for the path2.
  308.      * @return the path2
  309.      */
  310.     public int[] getPath2() {
  311.         return safeCopy(path2);
  312.     }

  313.     /** Setter for the path2.
  314.      * @param path2 the path2 to set
  315.      */
  316.     public void setPath2(final int[] path2) {
  317.         refuseFurtherComments();
  318.         this.path2 = safeCopy(path2);
  319.     }

  320.     /** Getter for external ephemeris names for participants.
  321.      * @return external ephemeris names for participants
  322.      */
  323.     public Map<Integer, String> getEphemerisNames() {
  324.         return ephemerisNames;
  325.     }

  326.     /** Setter for the external ephemeris names for participants.
  327.      * @param ephemerisNames external ephemeris names for participants
  328.      */
  329.     public void setEphemerisNames(final Map<Integer, String> ephemerisNames) {
  330.         refuseFurtherComments();
  331.         this.ephemerisNames = new TreeMap<Integer, String>();
  332.         this.ephemerisNames.putAll(ephemerisNames);
  333.     }

  334.     /** Adds an ephemeris name to the list.
  335.      * @param participantNumber the number of the participant
  336.      * @param ephemerisName name of the ephemeris for the participant
  337.      */
  338.     public void addEphemerisName(final int participantNumber, final String ephemerisName) {
  339.         refuseFurtherComments();
  340.         this.ephemerisNames.put(participantNumber, ephemerisName);
  341.     }

  342.     /** Getter for the transmitBand.
  343.      * @return the transmitBand
  344.      */
  345.     public String getTransmitBand() {
  346.         return transmitBand;
  347.     }

  348.     /** Setter for the transmitBand.
  349.      * @param transmitBand the transmitBand to set
  350.      */
  351.     public void setTransmitBand(final String transmitBand) {
  352.         refuseFurtherComments();
  353.         this.transmitBand = transmitBand;
  354.     }

  355.     /** Getter for the receiveBand.
  356.      * @return the receiveBand
  357.      */
  358.     public String getReceiveBand() {
  359.         return receiveBand;
  360.     }

  361.     /** Setter for the receiveBand.
  362.      * @param receiveBand the receiveBand to set
  363.      */
  364.     public void setReceiveBand(final String receiveBand) {
  365.         refuseFurtherComments();
  366.         this.receiveBand = receiveBand;
  367.     }

  368.     /** Getter for the turnaroundNumerator.
  369.      * @return the turnaroundNumerator
  370.      */
  371.     public int getTurnaroundNumerator() {
  372.         return turnaroundNumerator;
  373.     }

  374.     /** Setter for the turnaroundNumerator.
  375.      * @param turnaroundNumerator the turnaroundNumerator to set
  376.      */
  377.     public void setTurnaroundNumerator(final int turnaroundNumerator) {
  378.         refuseFurtherComments();
  379.         this.turnaroundNumerator = turnaroundNumerator;
  380.     }

  381.     /** Getter for the turnaroundDenominator.
  382.      * @return the turnaroundDenominator
  383.      */
  384.     public int getTurnaroundDenominator() {
  385.         return turnaroundDenominator;
  386.     }

  387.     /** Setter for the turnaroundDenominator.
  388.      * @param turnaroundDenominator the turnaroundDenominator to set
  389.      */
  390.     public void setTurnaroundDenominator(final int turnaroundDenominator) {
  391.         refuseFurtherComments();
  392.         this.turnaroundDenominator = turnaroundDenominator;
  393.     }

  394.     /** Getter for the timetagRef.
  395.      * @return the timetagRef
  396.      */
  397.     public TimetagReference getTimetagRef() {
  398.         return timetagRef;
  399.     }

  400.     /** Setter for the timetagRef.
  401.      * @param timetagRef the timetagRef to set
  402.      */
  403.     public void setTimetagRef(final TimetagReference timetagRef) {
  404.         refuseFurtherComments();
  405.         this.timetagRef = timetagRef;
  406.     }

  407.     /** Getter for the integrationInterval.
  408.      * @return the integrationInterval
  409.      */
  410.     public double getIntegrationInterval() {
  411.         return integrationInterval;
  412.     }

  413.     /** Setter for the integrationInterval.
  414.      * @param integrationInterval the integrationInterval to set
  415.      */
  416.     public void setIntegrationInterval(final double integrationInterval) {
  417.         refuseFurtherComments();
  418.         this.integrationInterval = integrationInterval;
  419.     }

  420.     /** Getter for the integrationRef.
  421.      * @return the integrationRef
  422.      */
  423.     public IntegrationReference getIntegrationRef() {
  424.         return integrationRef;
  425.     }

  426.     /** Setter for the integrationRef.
  427.      * @param integrationRef the integrationRef to set
  428.      */
  429.     public void setIntegrationRef(final IntegrationReference integrationRef) {
  430.         refuseFurtherComments();
  431.         this.integrationRef = integrationRef;
  432.     }

  433.     /** Getter for the freqOffset.
  434.      * @return the freqOffset
  435.      */
  436.     public double getFreqOffset() {
  437.         return freqOffset;
  438.     }

  439.     /** Setter for the freqOffset.
  440.      * @param freqOffset the freqOffset to set
  441.      */
  442.     public void setFreqOffset(final double freqOffset) {
  443.         refuseFurtherComments();
  444.         this.freqOffset = freqOffset;
  445.     }

  446.     /** Getter for the rangeMode.
  447.      * @return the rangeMode
  448.      */
  449.     public RangeMode getRangeMode() {
  450.         return rangeMode;
  451.     }

  452.     /** Setter for the rangeMode.
  453.      * @param rangeMode the rangeMode to set
  454.      */
  455.     public void setRangeMode(final RangeMode rangeMode) {
  456.         refuseFurtherComments();
  457.         this.rangeMode = rangeMode;
  458.     }

  459.     /** Getter for the range modulus in meters.
  460.      * @param converter converter to use if {@link #getRangeUnits() range units}
  461.      * are set to {@link RangeUnits#RU}
  462.      * @return the range modulus in meters
  463.      */
  464.     public double getRangeModulus(final RangeUnitsConverter converter) {
  465.         if (rangeUnits == RangeUnits.km) {
  466.             return rawRangeModulus * 1000;
  467.         } else if (rangeUnits == RangeUnits.s) {
  468.             return rawRangeModulus * Constants.SPEED_OF_LIGHT;
  469.         } else {
  470.             return converter.ruToMeters(this, startTime, rawRangeModulus);
  471.         }
  472.     }

  473.     /** Getter for the raw range modulus.
  474.      * @return the raw range modulus in range units
  475.      */
  476.     public double getRawRangeModulus() {
  477.         return rawRangeModulus;
  478.     }

  479.     /** Setter for the raw range modulus.
  480.      * @param rawRangeModulus the raw range modulus to set
  481.      */
  482.     public void setRawRangeModulus(final double rawRangeModulus) {
  483.         refuseFurtherComments();
  484.         this.rawRangeModulus = rawRangeModulus;
  485.     }

  486.     /** Getter for the rangeUnits.
  487.      * @return the rangeUnits
  488.      */
  489.     public RangeUnits getRangeUnits() {
  490.         return rangeUnits;
  491.     }

  492.     /** Setter for the rangeUnits.
  493.      * @param rangeUnits the rangeUnits to set
  494.      */
  495.     public void setRangeUnits(final RangeUnits rangeUnits) {
  496.         refuseFurtherComments();
  497.         this.rangeUnits = rangeUnits;
  498.     }

  499.     /** Getter for angleType.
  500.      * @return the angleType
  501.      */
  502.     public AngleType getAngleType() {
  503.         return angleType;
  504.     }

  505.     /** Setter for the angleType.
  506.      * @param angleType the angleType to set
  507.      */
  508.     public void setAngleType(final AngleType angleType) {
  509.         refuseFurtherComments();
  510.         this.angleType = angleType;
  511.     }

  512.     /** Get the the value of {@code REFERENCE_FRAME} as an Orekit {@link Frame}.
  513.      * @return The reference frame specified by the {@code REFERENCE_FRAME} keyword.
  514.      */
  515.     public FrameFacade getReferenceFrame() {
  516.         return referenceFrame;
  517.     }

  518.     /** Set the reference frame in which data are given: used for RADEC tracking data.
  519.      * @param referenceFrame the reference frame to be set
  520.      */
  521.     public void setReferenceFrame(final FrameFacade referenceFrame) {
  522.         refuseFurtherComments();
  523.         this.referenceFrame = referenceFrame;
  524.     }

  525.     /**
  526.      * Get the interpolation method to be used.
  527.      *
  528.      * @return the interpolation method
  529.      */
  530.     public String getInterpolationMethod() {
  531.         return interpolationMethod;
  532.     }

  533.     /**
  534.      * Set the interpolation method to be used.
  535.      * @param interpolationMethod the interpolation method to be set
  536.      */
  537.     public void setInterpolationMethod(final String interpolationMethod) {
  538.         refuseFurtherComments();
  539.         this.interpolationMethod = interpolationMethod;
  540.     }

  541.     /**
  542.      * Get the interpolation degree.
  543.      * @return the interpolation degree
  544.      */
  545.     public int getInterpolationDegree() {
  546.         return interpolationDegree;
  547.     }

  548.     /**
  549.      * Set the interpolation degree.
  550.      * @param interpolationDegree the interpolation degree to be set
  551.      */
  552.     public void setInterpolationDegree(final int interpolationDegree) {
  553.         refuseFurtherComments();
  554.         this.interpolationDegree = interpolationDegree;
  555.     }

  556.     /**
  557.      * Get the Doppler count bias.
  558.      * @return the Doppler count bias in Hz
  559.      */
  560.     public double getDopplerCountBias() {
  561.         return doppplerCountBias;
  562.     }

  563.     /**
  564.      * Set the Doppler count bias.
  565.      * @param dopplerCountBias Doppler count bias in Hz to set
  566.      */
  567.     public void setDopplerCountBias(final double dopplerCountBias) {
  568.         refuseFurtherComments();
  569.         this.doppplerCountBias = dopplerCountBias;
  570.     }

  571.     /**
  572.      * Get the Doppler count scale.
  573.      * @return the Doppler count scale
  574.      */
  575.     public double getDopplerCountScale() {
  576.         return dopplerCountScale;
  577.     }

  578.     /**
  579.      * Set the Doppler count Scale.
  580.      * @param dopplerCountScale Doppler count scale to set
  581.      */
  582.     public void setDopplerCountScale(final double dopplerCountScale) {
  583.         refuseFurtherComments();
  584.         this.dopplerCountScale = dopplerCountScale;
  585.     }

  586.     /**
  587.      * Check if there is a Doppler count rollover.
  588.      * @return true if there is a Doppler count rollover
  589.      */
  590.     public boolean hasDopplerCountRollover() {
  591.         return doppplerCountRollover;
  592.     }

  593.     /**
  594.      * Set the indicator for Doppler count rollover.
  595.      * @param dopplerCountRollover indicator for Doppler count rollover
  596.      */
  597.     public void setDopplerCountRollover(final boolean dopplerCountRollover) {
  598.         refuseFurtherComments();
  599.         this.doppplerCountRollover = dopplerCountRollover;
  600.     }

  601.     /** Getter for the transmitDelays.
  602.      * @return the transmitDelays
  603.      */
  604.     public Map<Integer, Double> getTransmitDelays() {
  605.         return transmitDelays;
  606.     }

  607.     /** Setter for the transmitDelays.
  608.      * @param transmitDelays the transmitDelays to set
  609.      */
  610.     public void setTransmitDelays(final Map<Integer, Double> transmitDelays) {
  611.         refuseFurtherComments();
  612.         this.transmitDelays = new TreeMap<Integer, Double>();
  613.         this.transmitDelays.putAll(transmitDelays);
  614.     }

  615.     /** Adds a transmit delay to the list.
  616.      *  @param participantNumber the number of the participants for which the transmit delay is given
  617.      *  @param transmitDelay the transmit delay value to add
  618.      */
  619.     public void addTransmitDelay(final int participantNumber, final double transmitDelay) {
  620.         refuseFurtherComments();
  621.         this.transmitDelays.put(participantNumber, transmitDelay);
  622.     }

  623.     /** Getter for receiveDelays.
  624.      * @return the receiveDelays
  625.      */
  626.     public Map<Integer, Double> getReceiveDelays() {
  627.         return receiveDelays;
  628.     }

  629.     /** Setter for the receiveDelays.
  630.      * @param receiveDelays the receiveDelays to set
  631.      */
  632.     public void setReceiveDelays(final Map<Integer, Double> receiveDelays) {
  633.         refuseFurtherComments();
  634.         this.receiveDelays = new TreeMap<Integer, Double>();
  635.         this.receiveDelays.putAll(receiveDelays);
  636.     }

  637.     /** Adds a receive delay to the list.
  638.      * @param participantNumber the number of the participants for which the receive delay is given
  639.      * @param receiveDelay the receive delay value to add
  640.      */
  641.     public void addReceiveDelay(final int participantNumber, final double receiveDelay) {
  642.         refuseFurtherComments();
  643.         this.receiveDelays.put(participantNumber, receiveDelay);
  644.     }
  645.     /** Getter for the dataQuality.
  646.      * @return the dataQuality
  647.      */
  648.     public DataQuality getDataQuality() {
  649.         return dataQuality;
  650.     }

  651.     /** Setter for the dataQuality.
  652.      * @param dataQuality the dataQuality to set
  653.      */
  654.     public void setDataQuality(final DataQuality dataQuality) {
  655.         refuseFurtherComments();
  656.         this.dataQuality = dataQuality;
  657.     }

  658.     /** Getter for the correctionAngle1.
  659.      * @return the correctionAngle1 (in radians)
  660.      */
  661.     public double getCorrectionAngle1() {
  662.         return correctionAngle1;
  663.     }

  664.     /** Setter for the correctionAngle1.
  665.      * @param correctionAngle1 the correctionAngle1 to set (in radians)
  666.      */
  667.     public void setCorrectionAngle1(final double correctionAngle1) {
  668.         refuseFurtherComments();
  669.         this.correctionAngle1 = correctionAngle1;
  670.     }

  671.     /** Getter for the correctionAngle2.
  672.      * @return the correctionAngle2 (in radians)
  673.      */
  674.     public double getCorrectionAngle2() {
  675.         return correctionAngle2;
  676.     }

  677.     /** Setter for the correctionAngle2.
  678.      * @param correctionAngle2 the correctionAngle2 to set (in radians)
  679.      */
  680.     public void setCorrectionAngle2(final double correctionAngle2) {
  681.         refuseFurtherComments();
  682.         this.correctionAngle2 = correctionAngle2;
  683.     }

  684.     /** Getter for the correctionDoppler.
  685.      * @return the correctionDoppler (in m/s)
  686.      */
  687.     public double getCorrectionDoppler() {
  688.         return correctionDoppler;
  689.     }

  690.     /** Setter for the correctionDoppler.
  691.      * @param correctionDoppler the correctionDoppler to set (in m/s)
  692.      */
  693.     public void setCorrectionDoppler(final double correctionDoppler) {
  694.         refuseFurtherComments();
  695.         this.correctionDoppler = correctionDoppler;
  696.     }

  697.     /** Getter for the magnitude correction.
  698.      * @return the magnitude correction
  699.      */
  700.     public double getCorrectionMagnitude() {
  701.         return correctionMagnitude;
  702.     }

  703.     /** Setter for the magnitude correction.
  704.      * @param correctionMagnitude the magnitude correction to set
  705.      */
  706.     public void setCorrectionMagnitude(final double correctionMagnitude) {
  707.         refuseFurtherComments();
  708.         this.correctionMagnitude = correctionMagnitude;
  709.     }

  710.     /** Getter for the raw correction for range in meters.
  711.      * @param converter converter to use if {@link #getRangeUnits() range units}
  712.      * are set to {@link RangeUnits#RU}
  713.      * @return the raw correction for range in meters
  714.      */
  715.     public double getCorrectionRange(final RangeUnitsConverter converter) {
  716.         if (rangeUnits == RangeUnits.km) {
  717.             return rawCorrectionRange * 1000;
  718.         } else if (rangeUnits == RangeUnits.s) {
  719.             return rawCorrectionRange * Constants.SPEED_OF_LIGHT;
  720.         } else {
  721.             return converter.ruToMeters(this, startTime, rawCorrectionRange);
  722.         }
  723.     }

  724.     /** Getter for the raw correction for range.
  725.      * @return the raw correction for range (in {@link #getRangeUnits()})
  726.      */
  727.     public double getRawCorrectionRange() {
  728.         return rawCorrectionRange;
  729.     }

  730.     /** Setter for the raw correction for range.
  731.      * @param rawCorrectionRange the raw correction for range to set (in {@link #getRangeUnits()})
  732.      */
  733.     public void setRawCorrectionRange(final double rawCorrectionRange) {
  734.         refuseFurtherComments();
  735.         this.rawCorrectionRange = rawCorrectionRange;
  736.     }

  737.     /** Getter for the radar cross section correction.
  738.      * @return the radar cross section correction in m²
  739.      */
  740.     public double getCorrectionRcs() {
  741.         return correctionRcs;
  742.     }

  743.     /** Setter for the radar cross section correction.
  744.      * @param correctionRcs the radar cross section correction in m² to set
  745.      */
  746.     public void setCorrectionRcs(final double correctionRcs) {
  747.         refuseFurtherComments();
  748.         this.correctionRcs = correctionRcs;
  749.     }

  750.     /** Getter for the yearly aberration correction.
  751.      * @return the yearly aberration correction in radians
  752.      */
  753.     public double getCorrectionAberrationYearly() {
  754.         return correctionAberrationYearly;
  755.     }

  756.     /** Setter for the yearly aberration correction.
  757.      * @param correctionAberrationYearly the yearly aberration correction in radians to set
  758.      */
  759.     public void setCorrectionAberrationYearly(final double correctionAberrationYearly) {
  760.         refuseFurtherComments();
  761.         this.correctionAberrationYearly = correctionAberrationYearly;
  762.     }

  763.     /** Getter for the diurnal aberration correction.
  764.      * @return the diurnal aberration correction in radians
  765.      */
  766.     public double getCorrectionAberrationDiurnal() {
  767.         return correctionAberrationDiurnal;
  768.     }

  769.     /** Setter for the diurnal aberration correction.
  770.      * @param correctionAberrationDiurnal the diurnal aberration correction in radians to set
  771.      */
  772.     public void setCorrectionAberrationDiurnal(final double correctionAberrationDiurnal) {
  773.         refuseFurtherComments();
  774.         this.correctionAberrationDiurnal = correctionAberrationDiurnal;
  775.     }

  776.     /** Getter for the correctionReceive.
  777.      * @return the correctionReceive (in TDM units, without conversion)
  778.      */
  779.     public double getCorrectionReceive() {
  780.         return correctionReceive;
  781.     }

  782.     /** Setter for the correctionReceive.
  783.      * @param correctionReceive the correctionReceive to set (in TDM units, without conversion)
  784.      */
  785.     public void setCorrectionReceive(final double correctionReceive) {
  786.         refuseFurtherComments();
  787.         this.correctionReceive = correctionReceive;
  788.     }

  789.     /** Getter for the correctionTransmit.
  790.      * @return the correctionTransmit (in TDM units, without conversion)
  791.      */
  792.     public double getCorrectionTransmit() {
  793.         return correctionTransmit;
  794.     }

  795.     /** Setter for the correctionTransmit.
  796.      * @param correctionTransmit the correctionTransmit to set (in TDM units, without conversion)
  797.      */
  798.     public void setCorrectionTransmit(final double correctionTransmit) {
  799.         refuseFurtherComments();
  800.         this.correctionTransmit = correctionTransmit;
  801.     }

  802.     /** Getter for the correctionApplied.
  803.      * @return the correctionApplied (in TDM units, without conversion)
  804.      */
  805.     public CorrectionApplied getCorrectionsApplied() {
  806.         return correctionsApplied;
  807.     }

  808.     /** Setter for the correctionApplied.
  809.      * @param correctionsApplied the correctionApplied to set (in TDM units, without conversion)
  810.      */
  811.     public void setCorrectionsApplied(final CorrectionApplied correctionsApplied) {
  812.         refuseFurtherComments();
  813.         this.correctionsApplied = correctionsApplied;
  814.     }

  815.     /** Safe copy of an integer array.
  816.      * @param original original array
  817.      * @return copy of the array
  818.      */
  819.     private int[] safeCopy(final int[] original) {
  820.         return original == null ? null : original.clone();
  821.     }

  822. }