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.cdm; 18 19 import org.orekit.files.ccsds.section.CommentsContainer; 20 import org.orekit.time.AbsoluteDate; 21 22 /** 23 * Container for OD parameters data block. 24 * <p> 25 * Beware that the Orekit getters and setters all rely on SI units. The parsers 26 * and writers take care of converting these SI units into CCSDS mandatory units. 27 * The {@link org.orekit.utils.units.Unit Unit} class provides useful 28 * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and 29 * {@link org.orekit.utils.units.Unit#toSI(double) toSI} methods in case the callers 30 * already use CCSDS units instead of the API SI units. The general-purpose 31 * {@link org.orekit.utils.units.Unit Unit} class (without an 's') and the 32 * CCSDS-specific {@link org.orekit.files.ccsds.definitions.Units Units} class 33 * (with an 's') also provide some predefined units. These predefined units and the 34 * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and 35 * {@link org.orekit.utils.units.Unit#toSI(double) toSI} conversion methods are indeed 36 * what the parsers and writers use for the conversions. 37 * </p> 38 * @author Melina Vanel 39 * @since 11.2 40 */ 41 public class ODParameters extends CommentsContainer { 42 43 /** The start of a time interval (UTC) that contains the time of the last accepted observation. */ 44 private AbsoluteDate timeLastObsStart; 45 46 /** The end of a time interval (UTC) that contains the time of the last accepted observation. */ 47 private AbsoluteDate timeLastObsEnd; 48 49 /** The recommended OD time span calculated for the object. */ 50 private double recommendedOdSpan; 51 52 /** Based on the observations available and the RECOMMENDED_OD_SPAN, the actual time span used for the OD of the object. */ 53 private double actualOdSpan; 54 55 /** The number of observations available for the OD of the object. */ 56 private int obsAvailable; 57 58 /** The number of observations accepted for the OD of the object. */ 59 private int obsUsed; 60 61 /** The number of sensor tracks available for the OD of the object. */ 62 private int tracksAvailable; 63 64 /** The number of sensor tracks accepted for the OD of the object. */ 65 private int tracksUsed; 66 67 /** The percentage of residuals accepted in the OD of the object (from 0 to 100). */ 68 private double residualsAccepted; 69 70 /** The weighted Root Mean Square (RMS) of the residuals from a batch least squares OD. */ 71 private double weightedRMS; 72 73 /** The epoch of the orbit determination used for this message (UTC). */ 74 private AbsoluteDate odEpoch; 75 76 /** Simple constructor. 77 */ 78 public ODParameters() { 79 recommendedOdSpan = Double.NaN; 80 actualOdSpan = Double.NaN; 81 residualsAccepted = Double.NaN; 82 weightedRMS = Double.NaN; 83 } 84 85 /** {@inheritDoc} */ 86 @Override 87 public void validate(final double version) { 88 super.validate(version); 89 } 90 91 /** 92 * Get the start of a time interval (UTC) that contains the time of the last accepted observation. 93 * @return the start of a time interval (UTC) 94 */ 95 public AbsoluteDate getTimeLastObsStart() { 96 return timeLastObsStart; 97 } 98 99 /** 100 * Set the start of a time interval (UTC) that contains the time of the last accepted observation. 101 * @param timeLastObsStart the start of a time interval (UTC) 102 */ 103 public void setTimeLastObsStart(final AbsoluteDate timeLastObsStart) { 104 refuseFurtherComments(); 105 this.timeLastObsStart = timeLastObsStart; 106 } 107 108 /** 109 * Get the start of a time interval (UTC) that contains the time of the last accepted observation. 110 * @return the start of a time interval (UTC) 111 */ 112 public AbsoluteDate getTimeLastObsEnd() { 113 return timeLastObsEnd; 114 } 115 116 /** 117 * Set the start of a time interval (UTC) that contains the time of the last accepted observation. 118 * @param timeLastObsEnd the start of a time interval (UTC) 119 */ 120 public void setTimeLastObsEnd(final AbsoluteDate timeLastObsEnd) { 121 refuseFurtherComments(); 122 this.timeLastObsEnd = timeLastObsEnd; 123 } 124 125 /** 126 * Get the recommended OD time span calculated for the object. 127 * @return the recommended OD time span (in days) calculated for the object 128 */ 129 public double getRecommendedOdSpan() { 130 return recommendedOdSpan; 131 } 132 133 /** 134 * Set the recommended OD time span calculated for the object. 135 * @param recommendedOdSpan recommended OD time span (in days) calculated for the object 136 */ 137 public void setRecommendedOdSpan(final double recommendedOdSpan) { 138 refuseFurtherComments(); 139 this.recommendedOdSpan = recommendedOdSpan; 140 } 141 142 /** 143 * Get the actual OD time based on the observations available and the RECOMMENDED_OD_SPAN. 144 * @return the actual OD time (in days) 145 */ 146 public double getActualOdSpan() { 147 return actualOdSpan; 148 } 149 150 /** 151 * Set the actual OD time based on the observations available and the RECOMMENDED_OD_SPAN. 152 * @param actualOdSpan the actual OD time (in days) 153 */ 154 public void setActualOdSpan(final double actualOdSpan) { 155 refuseFurtherComments(); 156 this.actualOdSpan = actualOdSpan; 157 } 158 159 /** 160 * Get the number of observations available for the OD of the object. 161 * @return the number of observations available 162 */ 163 public int getObsAvailable() { 164 return obsAvailable; 165 } 166 167 /** 168 * Set the number of observations available for the OD of the object. 169 * @param obsAvailable the number of observations available 170 */ 171 public void setObsAvailable(final int obsAvailable) { 172 refuseFurtherComments(); 173 this.obsAvailable = obsAvailable; 174 } 175 176 /** 177 * Get the number of observations accepted for the OD of the object. 178 * @return the number of observations used 179 */ 180 public int getObsUsed() { 181 return obsUsed; 182 } 183 184 /** 185 * Set the number of observations accepted for the OD of the object. 186 * @param obsUsed the number of observations used 187 */ 188 public void setObsUsed(final int obsUsed) { 189 refuseFurtherComments(); 190 this.obsUsed = obsUsed; 191 } 192 193 /** 194 * Get the number of sensor tracks available for the OD of the object. 195 * @return the number of sensor tracks available 196 */ 197 public int getTracksAvailable() { 198 return tracksAvailable; 199 } 200 201 /** 202 * Set the number of sensor tracks available for the OD of the object. 203 * @param tracksAvailable the number of sensor tracks available 204 */ 205 public void setTracksAvailable(final int tracksAvailable) { 206 refuseFurtherComments(); 207 this.tracksAvailable = tracksAvailable; 208 } 209 210 /** 211 * Get the number of sensor tracks used for the OD of the object. 212 * @return the number of sensor tracks used 213 */ 214 public int getTracksUsed() { 215 return tracksUsed; 216 } 217 218 /** 219 * Set the number of sensor tracks used for the OD of the object. 220 * @param tracksUsed the number of sensor tracks used 221 */ 222 public void setTracksUsed(final int tracksUsed) { 223 refuseFurtherComments(); 224 this.tracksUsed = tracksUsed; 225 } 226 227 /** 228 * Get the percentage of residuals accepted in the OD of the object (from 0 to 100). 229 * @return the percentage of residuals accepted in the OD 230 */ 231 public double getResidualsAccepted() { 232 return residualsAccepted; 233 } 234 235 /** 236 * Set the percentage of residuals accepted in the OD of the object (from 0 to 100). 237 * @param residualsAccepted the percentage of residuals accepted in the OD to be set 238 */ 239 public void setResidualsAccepted(final double residualsAccepted) { 240 refuseFurtherComments(); 241 this.residualsAccepted = residualsAccepted; 242 } 243 244 /** 245 * Get the weighted Root Mean Square (RMS) of the residuals from a batch least squares OD. 246 * @return the weighted Root Mean Square (RMS) of the residuals from a batch least squares OD 247 */ 248 public double getWeightedRMS() { 249 return weightedRMS; 250 } 251 252 /** 253 * Set the weighted Root Mean Square (RMS) of the residuals from a batch least squares OD. 254 * @param WeightedRMS the weighted Root Mean Square (RMS) of the residuals from a batch least squares OD 255 */ 256 public void setWeightedRMS(final double WeightedRMS) { 257 refuseFurtherComments(); 258 this.weightedRMS = WeightedRMS; 259 } 260 261 /** Get the epoch of the orbit determination used for this message. 262 * @return the odEpoch the epoch of the orbit determination used for this message 263 */ 264 public AbsoluteDate getOdEpoch() { 265 return odEpoch; 266 } 267 268 /** Set the epoch of the orbit determination used for this message. 269 * @param odEpoch the odEpoch to set 270 */ 271 public void setOdEpoch(final AbsoluteDate odEpoch) { 272 this.odEpoch = odEpoch; 273 } 274 275 }