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 18 package org.orekit.files.ccsds.ndm.odm.ocm; 19 20 import java.util.Collections; 21 import java.util.List; 22 23 import org.orekit.files.ccsds.definitions.OdMethodFacade; 24 import org.orekit.files.ccsds.section.CommentsContainer; 25 import org.orekit.time.AbsoluteDate; 26 27 /** Orbit determination data. 28 * <p> 29 * Beware that the Orekit getters and setters all rely on SI units. The parsers 30 * and writers take care of converting these SI units into CCSDS mandatory units. 31 * The {@link org.orekit.utils.units.Unit Unit} class provides useful 32 * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and 33 * {@link org.orekit.utils.units.Unit#toSI(double) toSI} methods in case the callers 34 * already use CCSDS units instead of the API SI units. The general-purpose 35 * {@link org.orekit.utils.units.Unit Unit} class (without an 's') and the 36 * CCSDS-specific {@link org.orekit.files.ccsds.definitions.Units Units} class 37 * (with an 's') also provide some predefined units. These predefined units and the 38 * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and 39 * {@link org.orekit.utils.units.Unit#toSI(double) toSI} conversion methods are indeed 40 * what the parsers and writers use for the conversions. 41 * </p> 42 * @author Luc Maisonobe 43 * @since 11.0 44 */ 45 public class OrbitDetermination extends CommentsContainer { 46 47 /** Identification number. */ 48 private String id; 49 50 /** Identification of previous orbit determination. */ 51 private String prevId; 52 53 /** Orbit determination method. */ 54 private OdMethodFacade method; 55 56 /** Time tag for orbit determination solved-for state. */ 57 private AbsoluteDate epoch; 58 59 /** Time elapsed between first accepted observation on epoch. */ 60 private double timeSinceFirstObservation; 61 62 /** Time elapsed between last accepted observation on epoch. */ 63 private double timeSinceLastObservation; 64 65 /** Sime span of observation recommended for the OD of the object. */ 66 private double recommendedOdSpan; 67 68 /** Actual time span used for the OD of the object. */ 69 private double actualOdSpan; 70 71 /** Number of observations available within the actual OD span. */ 72 private Integer obsAvailable; 73 74 /** Number of observations accepted within the actual OD span. */ 75 private Integer obsUsed; 76 77 /** Number of sensors tracks available for the OD within the actual OD span. */ 78 private Integer tracksAvailable; 79 80 /** Number of sensors tracks accepted for the OD within the actual OD span. */ 81 private Integer tracksUsed; 82 83 /** Maximum time between observations in the OD of the object. */ 84 private double maximumObsGap; 85 86 /** Positional error ellipsoid 1σ major eigenvalue at the epoch of OD. */ 87 private double epochEigenMaj; 88 89 /** Positional error ellipsoid 1σ intermediate eigenvalue at the epoch of OD. */ 90 private double epochEigenInt; 91 92 /** Positional error ellipsoid 1σ minor eigenvalue at the epoch of OD. */ 93 private double epochEigenMin; 94 95 /** Maximum predicted major eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM. */ 96 private double maxPredictedEigenMaj; 97 98 /** Minimum predicted minor eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM. */ 99 private double minPredictedEigenMin; 100 101 /** Confidence metric. */ 102 private double confidence; 103 104 /** Generalize Dilution Of Precision. */ 105 private double gdop; 106 107 /** Number of solved-for states. */ 108 private Integer solveN; 109 110 /** Description of state elements solved-for. */ 111 private List<String> solveStates; 112 113 /** Number of consider parameters. */ 114 private Integer considerN; 115 116 /** Description of consider parameters. */ 117 private List<String> considerParameters; 118 119 /** Specific Energy Dissipation Rate. 120 * @since 12.0 121 */ 122 private double sedr; 123 124 /** Number of sensors used. */ 125 private Integer sensorsN; 126 127 /** Description of sensors used. */ 128 private List<String> sensors; 129 130 /** Weighted RMS residual ratio. */ 131 private double weightedRms; 132 133 /** Observation data types used. */ 134 private List<String> dataTypes; 135 136 /** Simple constructor. 137 */ 138 public OrbitDetermination() { 139 sedr = Double.NaN; 140 solveStates = Collections.emptyList(); 141 considerParameters = Collections.emptyList(); 142 sensors = Collections.emptyList(); 143 dataTypes = Collections.emptyList(); 144 // In 502.0-B-3 (Table 6-11) these values are optional with no default 145 timeSinceFirstObservation = Double.NaN; 146 timeSinceLastObservation = Double.NaN; 147 recommendedOdSpan = Double.NaN; 148 actualOdSpan = Double.NaN; 149 maximumObsGap = Double.NaN; 150 epochEigenInt = Double.NaN; 151 epochEigenMaj = Double.NaN; 152 epochEigenMin = Double.NaN; 153 maxPredictedEigenMaj = Double.NaN; 154 minPredictedEigenMin = Double.NaN; 155 confidence = Double.NaN; 156 gdop = Double.NaN; 157 weightedRms = Double.NaN; 158 } 159 160 /** {@inheritDoc} */ 161 @Override 162 public void validate(final double version) { 163 super.validate(version); 164 checkNotNull(id, OrbitDeterminationKey.OD_ID.name()); 165 checkNotNull(method, OrbitDeterminationKey.OD_METHOD.name()); 166 checkNotNull(epoch, OrbitDeterminationKey.OD_EPOCH.name()); 167 } 168 169 /** Get identification number. 170 * @return identification number 171 */ 172 public String getId() { 173 return id; 174 } 175 176 /** Set identification number. 177 * @param id identification number 178 */ 179 public void setId(final String id) { 180 this.id = id; 181 } 182 183 /** Get identification of previous orbit determination. 184 * @return identification of previous orbit determination 185 */ 186 public String getPrevId() { 187 return prevId; 188 } 189 190 /** Set identification of previous orbit determination. 191 * @param prevId identification of previous orbit determination 192 */ 193 public void setPrevId(final String prevId) { 194 this.prevId = prevId; 195 } 196 197 /** Get orbit determination method. 198 * @return orbit determination method 199 */ 200 public OdMethodFacade getMethod() { 201 return method; 202 } 203 204 /** Set orbit determination method. 205 * @param method orbit determination method 206 */ 207 public void setMethod(final OdMethodFacade method) { 208 this.method = method; 209 } 210 211 /** Get time tag for orbit determination solved-for state. 212 * @return time tag for orbit determination solved-for state 213 */ 214 public AbsoluteDate getEpoch() { 215 return epoch; 216 } 217 218 /** Set time tag for orbit determination solved-for state. 219 * @param epoch time tag for orbit determination solved-for state 220 */ 221 public void setEpoch(final AbsoluteDate epoch) { 222 this.epoch = epoch; 223 } 224 225 /** Get time elapsed between first accepted observation on epoch. 226 * @return time elapsed between first accepted observation on epoch 227 */ 228 public double getTimeSinceFirstObservation() { 229 return timeSinceFirstObservation; 230 } 231 232 /** Set time elapsed between first accepted observation on epoch. 233 * @param timeSinceFirstObservation time elapsed between first accepted observation on epoch 234 */ 235 public void setTimeSinceFirstObservation(final double timeSinceFirstObservation) { 236 this.timeSinceFirstObservation = timeSinceFirstObservation; 237 } 238 239 /** Get time elapsed between last accepted observation on epoch. 240 * @return time elapsed between last accepted observation on epoch 241 */ 242 public double getTimeSinceLastObservation() { 243 return timeSinceLastObservation; 244 } 245 246 /** Set time elapsed between last accepted observation on epoch. 247 * @param timeSinceLastObservation time elapsed between last accepted observation on epoch 248 */ 249 public void setTimeSinceLastObservation(final double timeSinceLastObservation) { 250 this.timeSinceLastObservation = timeSinceLastObservation; 251 } 252 253 /** Get time span of observation recommended for the OD of the object. 254 * @return time span of observation recommended for the OD of the object 255 */ 256 public double getRecommendedOdSpan() { 257 return recommendedOdSpan; 258 } 259 260 /** Set time span of observation recommended for the OD of the object. 261 * @param recommendedOdSpan time span of observation recommended for the OD of the object 262 */ 263 public void setRecommendedOdSpan(final double recommendedOdSpan) { 264 this.recommendedOdSpan = recommendedOdSpan; 265 } 266 267 /** Get actual time span used for the OD of the object. 268 * @return actual time span used for the OD of the object 269 */ 270 public double getActualOdSpan() { 271 return actualOdSpan; 272 } 273 274 /** Set actual time span used for the OD of the object. 275 * @param actualOdSpan actual time span used for the OD of the object 276 */ 277 public void setActualOdSpan(final double actualOdSpan) { 278 this.actualOdSpan = actualOdSpan; 279 } 280 281 /** Get number of observations available within the actual OD span. 282 * @return number of observations available within the actual OD span 283 */ 284 public Integer getObsAvailable() { 285 return obsAvailable; 286 } 287 288 /** Set number of observations available within the actual OD span. 289 * @param obsAvailable number of observations available within the actual OD span 290 */ 291 public void setObsAvailable(final Integer obsAvailable) { 292 this.obsAvailable = obsAvailable; 293 } 294 295 /** Get number of observations accepted within the actual OD span. 296 * @return number of observations accepted within the actual OD span 297 */ 298 public Integer getObsUsed() { 299 return obsUsed; 300 } 301 302 /** Set number of observations accepted within the actual OD span. 303 * @param obsUsed number of observations accepted within the actual OD span 304 */ 305 public void setObsUsed(final Integer obsUsed) { 306 this.obsUsed = obsUsed; 307 } 308 309 /** Get number of sensors tracks available for the OD within the actual OD span. 310 * @return number of sensors tracks available for the OD within the actual OD span 311 */ 312 public Integer getTracksAvailable() { 313 return tracksAvailable; 314 } 315 316 /** Set number of sensors tracks available for the OD within the actual OD span. 317 * @param tracksAvailable number of sensors tracks available for the OD within the actual OD span 318 */ 319 public void setTracksAvailable(final Integer tracksAvailable) { 320 this.tracksAvailable = tracksAvailable; 321 } 322 323 /** Get number of sensors tracks accepted for the OD within the actual OD span. 324 * @return number of sensors tracks accepted for the OD within the actual OD span 325 */ 326 public Integer getTracksUsed() { 327 return tracksUsed; 328 } 329 330 /** Set number of sensors tracks accepted for the OD within the actual OD span. 331 * @param tracksUsed number of sensors tracks accepted for the OD within the actual OD span 332 */ 333 public void setTracksUsed(final Integer tracksUsed) { 334 this.tracksUsed = tracksUsed; 335 } 336 337 /** Get maximum time between observations in the OD of the object. 338 * @return maximum time between observations in the OD of the object 339 */ 340 public double getMaximumObsGap() { 341 return maximumObsGap; 342 } 343 344 /** Set maximum time between observations in the OD of the object. 345 * @param maximumObsGap maximum time between observations in the OD of the object 346 */ 347 public void setMaximumObsGap(final double maximumObsGap) { 348 this.maximumObsGap = maximumObsGap; 349 } 350 351 /** Get positional error ellipsoid 1σ major eigenvalue at the epoch of OD. 352 * @return positional error ellipsoid 1σ major eigenvalue at the epoch of OD 353 */ 354 public double getEpochEigenMaj() { 355 return epochEigenMaj; 356 } 357 358 /** Set positional error ellipsoid 1σ major eigenvalue at the epoch of OD. 359 * @param epochEigenMaj positional error ellipsoid 1σ major eigenvalue at the epoch of OD 360 */ 361 public void setEpochEigenMaj(final double epochEigenMaj) { 362 this.epochEigenMaj = epochEigenMaj; 363 } 364 365 /** Get positional error ellipsoid 1σ intermediate eigenvalue at the epoch of OD. 366 * @return positional error ellipsoid 1σ intermediate eigenvalue at the epoch of OD 367 */ 368 public double getEpochEigenInt() { 369 return epochEigenInt; 370 } 371 372 /** Set positional error ellipsoid 1σ intermediate eigenvalue at the epoch of OD. 373 * @param epochEigenInt positional error ellipsoid 1σ intermediate eigenvalue at the epoch of OD 374 */ 375 public void setEpochEigenInt(final double epochEigenInt) { 376 this.epochEigenInt = epochEigenInt; 377 } 378 379 /** Get positional error ellipsoid 1σ minor eigenvalue at the epoch of OD. 380 * @return positional error ellipsoid 1σ minor eigenvalue at the epoch of OD 381 */ 382 public double getEpochEigenMin() { 383 return epochEigenMin; 384 } 385 386 /** Set positional error ellipsoid 1σ minor eigenvalue at the epoch of OD. 387 * @param epochEigenMin positional error ellipsoid 1σ minor eigenvalue at the epoch of OD 388 */ 389 public void setEpochEigenMin(final double epochEigenMin) { 390 this.epochEigenMin = epochEigenMin; 391 } 392 393 /** Get maximum predicted major eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM. 394 * @return maximum predicted major eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM 395 */ 396 public double getMaxPredictedEigenMaj() { 397 return maxPredictedEigenMaj; 398 } 399 400 /** Set maximum predicted major eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM. 401 * @param maxPredictedEigenMaj maximum predicted major eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM 402 */ 403 public void setMaxPredictedEigenMaj(final double maxPredictedEigenMaj) { 404 this.maxPredictedEigenMaj = maxPredictedEigenMaj; 405 } 406 407 /** Get minimum predicted minor eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM. 408 * @return minimum predicted v eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM 409 */ 410 public double getMinPredictedEigenMin() { 411 return minPredictedEigenMin; 412 } 413 414 /** Set minimum predicted minor eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM. 415 * @param minPredictedEigenMin minimum predicted minor eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM 416 */ 417 public void setMinPredictedEigenMin(final double minPredictedEigenMin) { 418 this.minPredictedEigenMin = minPredictedEigenMin; 419 } 420 421 /** Get confidence metric. 422 * @return confidence metric 423 */ 424 public double getConfidence() { 425 return confidence; 426 } 427 428 /** Set confidence metric. 429 * @param confidence confidence metric 430 */ 431 public void setConfidence(final double confidence) { 432 this.confidence = confidence; 433 } 434 435 /** Get generalize Dilution Of Precision. 436 * @return generalize Dilution Of Precision 437 */ 438 public double getGdop() { 439 return gdop; 440 } 441 442 /** Set generalize Dilution Of Precision. 443 * @param gdop generalize Dilution Of Precision 444 */ 445 public void setGdop(final double gdop) { 446 this.gdop = gdop; 447 } 448 449 /** Get number of solved-for states. 450 * @return number of solved-for states 451 */ 452 public Integer getSolveN() { 453 return solveN; 454 } 455 456 /** Set number of solved-for states. 457 * @param solveN number of solved-for states 458 */ 459 public void setSolveN(final Integer solveN) { 460 this.solveN = solveN; 461 } 462 463 /** Get description of state elements solved-for. 464 * @return description of state elements solved-for 465 */ 466 public List<String> getSolveStates() { 467 return solveStates; 468 } 469 470 /** Set description of state elements solved-for. 471 * @param solveStates description of state elements solved-for 472 */ 473 public void setSolveStates(final List<String> solveStates) { 474 this.solveStates = solveStates; 475 } 476 477 /** Get number of consider parameters. 478 * @return number of consider parameters 479 */ 480 public Integer getConsiderN() { 481 return considerN; 482 } 483 484 /** Set number of consider parameters. 485 * @param considerN number of consider parameters 486 */ 487 public void setConsiderN(final Integer considerN) { 488 this.considerN = considerN; 489 } 490 491 /** Get description of consider parameters. 492 * @return description of consider parameters 493 */ 494 public List<String> getConsiderParameters() { 495 return considerParameters; 496 } 497 498 /** Set description of consider parameters. 499 * @param considerParameters description of consider parameters 500 */ 501 public void setConsiderParameters(final List<String> considerParameters) { 502 this.considerParameters = considerParameters; 503 } 504 505 /** Get Specific Energy Dissipation Rate. 506 * @return Specific Energy Dissipation Rate 507 * @since 12.0 508 */ 509 public double getSedr() { 510 return sedr; 511 } 512 513 /** Set Specific Energy Dissipation Rate. 514 * @param sedr Specific Energy Dissipation Rate (W/kg) 515 * @since 12.0 516 */ 517 public void setSedr(final double sedr) { 518 this.sedr = sedr; 519 } 520 521 /** Get number of sensors used. 522 * @return number of sensors used 523 */ 524 public Integer getSensorsN() { 525 return sensorsN; 526 } 527 528 /** Set number of sensors used. 529 * @param sensorsN number of sensors used 530 */ 531 public void setSensorsN(final Integer sensorsN) { 532 this.sensorsN = sensorsN; 533 } 534 535 /** Get description of sensors used. 536 * @return description of sensors used 537 */ 538 public List<String> getSensors() { 539 return sensors; 540 } 541 542 /** Set description of sensors used. 543 * @param sensors description of sensors used 544 */ 545 public void setSensors(final List<String> sensors) { 546 this.sensors = sensors; 547 } 548 549 /** Get weighted RMS residual ratio. 550 * @return weighted RMS residual ratio 551 */ 552 public double getWeightedRms() { 553 return weightedRms; 554 } 555 556 /** Set weighted RMS residual ratio. 557 * @param weightedRms weighted RMS residual ratio 558 */ 559 public void setWeightedRms(final double weightedRms) { 560 this.weightedRms = weightedRms; 561 } 562 563 /** Get observation data types used. 564 * @return observation data types used 565 */ 566 public List<String> getDataTypes() { 567 return dataTypes; 568 } 569 570 /** Set observation data types used. 571 * @param dataTypes observation data types used 572 */ 573 public void setDataTypes(final List<String> dataTypes) { 574 this.dataTypes = dataTypes; 575 } 576 577 }