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.bodies.CelestialBodies;
24  import org.orekit.files.ccsds.definitions.BodyFacade;
25  import org.orekit.files.ccsds.section.CommentsContainer;
26  import org.orekit.time.AbsoluteDate;
27  
28  /** Perturbation parameters.
29   * <p>
30   * Beware that the Orekit getters and setters all rely on SI units. The parsers
31   * and writers take care of converting these SI units into CCSDS mandatory units.
32   * The {@link org.orekit.utils.units.Unit Unit} class provides useful
33   * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and
34   * {@link org.orekit.utils.units.Unit#toSI(double) toSI} methods in case the callers
35   * already use CCSDS units instead of the API SI units. The general-purpose
36   * {@link org.orekit.utils.units.Unit Unit} class (without an 's') and the
37   * CCSDS-specific {@link org.orekit.files.ccsds.definitions.Units Units} class
38   * (with an 's') also provide some predefined units. These predefined units and the
39   * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and
40   * {@link org.orekit.utils.units.Unit#toSI(double) toSI} conversion methods are indeed
41   * what the parsers and writers use for the conversions.
42   * </p>
43   * @author Luc Maisonobe
44   * @since 11.0
45   */
46  public class Perturbations extends CommentsContainer {
47  
48      /** Name of atmospheric model. */
49      private String atmosphericModel;
50  
51      /** Gravity model name. */
52      private String gravityModel;
53  
54      /** Degree of the gravity model. */
55      private int gravityDegree;
56  
57      /** Order of the gravity model. */
58      private int gravityOrder;
59  
60      /** Oblate spheroid equatorial radius of central body. */
61      private double equatorialRadius;
62  
63      /** Gravitational coefficient of attracting body. */
64      private double gm;
65  
66      /** N-body perturbation bodies. */
67      private List<BodyFacade> nBodyPerturbations;
68  
69      /** Central body angular rotation rate. */
70      private double centralBodyRotation;
71  
72      /** Central body oblate spheroid oblateness. */
73      private double oblateFlattening;
74  
75      /** Ocean tides model. */
76      private String oceanTidesModel;
77  
78      /** Solid tides model. */
79      private String solidTidesModel;
80  
81      /** Reduction theory used for precession and nutation modeling. */
82      private String reductionTheory;
83  
84      /** Albedo model. */
85      private String albedoModel;
86  
87      /** Albedo grid size. Optional in 502.0-B-3 with no default. */
88      private Integer albedoGridSize;
89  
90      /** Shadow model used for solar radiation pressure. */
91      private ShadowModel shadowModel;
92  
93      /** Celestial bodies casting shadow. */
94      private List<BodyFacade> shadowBodies;
95  
96      /** Solar Radiation Pressure model. */
97      private String srpModel;
98  
99      /** Space Weather data source. */
100     private String spaceWeatherSource;
101 
102     /** Epoch of the Space Weather data. */
103     private AbsoluteDate spaceWeatherEpoch;
104 
105     /** Interpolation method for Space Weather data. */
106     private String interpMethodSW;
107 
108     /** Fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ. */
109     private double fixedGeomagneticKp;
110 
111     /** Fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ. */
112     private double fixedGeomagneticAp;
113 
114     /** Fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst. */
115     private double fixedGeomagneticDst;
116 
117     /** Fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7. */
118     private double fixedF10P7;
119 
120     /** Fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7. */
121     private double fixedF10P7Mean;
122 
123     /** Fixed (time invariant) value of the Solar Flux daily proxy M10.7. */
124     private double fixedM10P7;
125 
126     /** Fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7. */
127     private double fixedM10P7Mean;
128 
129     /** Fixed (time invariant) value of the Solar Flux daily proxy S10.7. */
130     private double fixedS10P7;
131 
132     /** Fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7. */
133     private double fixedS10P7Mean;
134 
135     /** Fixed (time invariant) value of the Solar Flux daily proxy Y10.7. */
136     private double fixedY10P7;
137 
138     /** Fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7. */
139     private double fixedY10P7Mean;
140 
141     /** Simple constructor.
142      * @param celestialBodies factory for celestial bodies
143      */
144     public Perturbations(final CelestialBodies celestialBodies) {
145         // we don't call the setXxx() methods in order to avoid
146         // calling refuseFurtherComments as a side effect
147         equatorialRadius    = Double.NaN;
148         gm                  = Double.NaN;
149         centralBodyRotation = Double.NaN;
150         oblateFlattening    = Double.NaN;
151         fixedGeomagneticKp  = Double.NaN;
152         fixedGeomagneticAp  = Double.NaN;
153         fixedGeomagneticDst = Double.NaN;
154         fixedF10P7          = Double.NaN;
155         fixedF10P7Mean      = Double.NaN;
156         fixedM10P7          = Double.NaN;
157         fixedM10P7Mean      = Double.NaN;
158         fixedS10P7          = Double.NaN;
159         fixedS10P7Mean      = Double.NaN;
160         fixedY10P7          = Double.NaN;
161         fixedY10P7Mean      = Double.NaN;
162         // In 502.0-B-3 (p. 6-50) SHADOW_BODIES is optional with no default
163         shadowBodies = Collections.emptyList();
164     }
165 
166     /** Get name of atmospheric model.
167      * @return name of atmospheric model
168      */
169     public String getAtmosphericModel() {
170         return atmosphericModel;
171     }
172 
173     /** Set name of atmospheric model.
174      * @param atmosphericModel name of atmospheric model
175      */
176     public void setAtmosphericModel(final String atmosphericModel) {
177         this.atmosphericModel = atmosphericModel;
178     }
179 
180     /** Get gravity model name.
181      * @return gravity model name
182      */
183     public String getGravityModel() {
184         return gravityModel;
185     }
186 
187     /** Get degree of the gravity model.
188      * @return degree of the gravity model
189      */
190     public int getGravityDegree() {
191         return gravityDegree;
192     }
193 
194     /** Get order of the gravity model.
195      * @return order of the gravity model
196      */
197     public int getGravityOrder() {
198         return gravityOrder;
199     }
200 
201     /** Set gravity model.
202      * @param name name of the model
203      * @param degree degree of the model
204      * @param order order of the model
205      */
206     public void setGravityModel(final String name, final int degree, final int order) {
207         this.gravityModel  = name;
208         this.gravityDegree = degree;
209         this.gravityOrder  = order;
210     }
211 
212     /** Get oblate spheroid equatorial radius of central body.
213      * @return oblate spheroid equatorial radius of central body
214      */
215     public double getEquatorialRadius() {
216         return equatorialRadius;
217     }
218 
219     /** Set oblate spheroid equatorial radius of central body.
220      * @param equatorialRadius oblate spheroid equatorial radius of central body
221      */
222     public void setEquatorialRadius(final double equatorialRadius) {
223         this.equatorialRadius = equatorialRadius;
224     }
225 
226     /** Get gravitational coefficient of attracting body.
227      * @return gravitational coefficient of attracting body
228      */
229     public double getGm() {
230         return gm;
231     }
232 
233     /** Set gravitational coefficient of attracting body.
234      * @param gm gravitational coefficient of attracting body
235      */
236     public void setGm(final double gm) {
237         this.gm = gm;
238     }
239 
240     /** Get n-body perturbation bodies.
241      * @return n-body perturbation bodies
242      */
243     public List<BodyFacade> getNBodyPerturbations() {
244         return nBodyPerturbations;
245     }
246 
247     /** Set n-body perturbation bodies.
248      * @param nBody n-body perturbation bodies
249      */
250     public void setNBodyPerturbations(final List<BodyFacade> nBody) {
251         this.nBodyPerturbations = nBody;
252     }
253 
254     /** Get central body angular rotation rate.
255      * @return central body angular rotation rate
256      */
257     public double getCentralBodyRotation() {
258         return centralBodyRotation;
259     }
260 
261     /** Set central body angular rotation rate.
262      * @param centralBodyRotation central body angular rotation rate
263      */
264     public void setCentralBodyRotation(final double centralBodyRotation) {
265         this.centralBodyRotation = centralBodyRotation;
266     }
267 
268     /** Get central body oblate spheroid oblateness.
269      * @return central body oblate spheroid oblateness
270      */
271     public double getOblateFlattening() {
272         return oblateFlattening;
273     }
274 
275     /** Set central body oblate spheroid oblateness.
276      * @param oblateFlattening central body oblate spheroid oblateness
277      */
278     public void setOblateFlattening(final double oblateFlattening) {
279         this.oblateFlattening = oblateFlattening;
280     }
281 
282     /** Get ocean tides model.
283      * @return ocean tides model
284      */
285     public String getOceanTidesModel() {
286         return oceanTidesModel;
287     }
288 
289     /** Set ocean tides model.
290      * @param oceanTidesModel ocean tides model
291      */
292     public void setOceanTidesModel(final String oceanTidesModel) {
293         this.oceanTidesModel = oceanTidesModel;
294     }
295 
296     /** Get solid tides model.
297      * @return solid tides model
298      */
299     public String getSolidTidesModel() {
300         return solidTidesModel;
301     }
302 
303     /** Set solid tides model.
304      * @param solidTidesModel solid tides model
305      */
306     public void setSolidTidesModel(final String solidTidesModel) {
307         this.solidTidesModel = solidTidesModel;
308     }
309 
310     /** Get reduction theory used for precession and nutation modeling.
311      * @return reduction theory used for precession and nutation modeling
312      */
313     public String getReductionTheory() {
314         return reductionTheory;
315     }
316 
317     /** Set reduction theory used for precession and nutation modeling.
318      * @param reductionTheory reduction theory used for precession and nutation modeling
319      */
320     public void setReductionTheory(final String reductionTheory) {
321         this.reductionTheory = reductionTheory;
322     }
323 
324     /** Get albedo model.
325      * @return albedo model
326      */
327     public String getAlbedoModel() {
328         return albedoModel;
329     }
330 
331     /** Set albedo model.
332      * @param albedoModel albedo model
333      */
334     public void setAlbedoModel(final String albedoModel) {
335         this.albedoModel = albedoModel;
336     }
337 
338     /** Get albedo grid size.
339      * @return albedo grid size
340      */
341     public Integer getAlbedoGridSize() {
342         return albedoGridSize;
343     }
344 
345     /** Set albedo grid size.
346      * @param albedoGridSize albedo grid size
347      */
348     public void setAlbedoGridSize(final Integer albedoGridSize) {
349         this.albedoGridSize = albedoGridSize;
350     }
351 
352     /** Get shadow model used for solar radiation pressure.
353      * @return shadow model used for solar radiation pressure
354      */
355     public ShadowModel getShadowModel() {
356         return shadowModel;
357     }
358 
359     /** Set shadow model used for solar radiation pressure.
360      * @param shadowModel shadow model used for solar radiation pressure
361      */
362     public void setShadowModel(final ShadowModel shadowModel) {
363         this.shadowModel = shadowModel;
364     }
365 
366     /** Get celestial bodies casting shadows.
367      * @return celestial bodies casting shadows
368      */
369     public List<BodyFacade> getShadowBodies() {
370         return shadowBodies;
371     }
372 
373     /** Set celestial bodies casting shadows.
374      * @param shadowBodies celestial bodies casting shadows
375      */
376     public void setShadowBodies(final List<BodyFacade> shadowBodies) {
377         this.shadowBodies = shadowBodies;
378     }
379 
380     /** Get Solar Radiation Pressure model.
381      * @return Solar Radiation Pressure model
382      */
383     public String getSrpModel() {
384         return srpModel;
385     }
386 
387     /** Set Solar Radiation Pressure model.
388      * @param srpModel Solar Radiation Pressure model
389      */
390     public void setSrpModel(final String srpModel) {
391         this.srpModel = srpModel;
392     }
393 
394     /** Get Space Weather data source.
395      * @return Space Weather data source
396      */
397     public String getSpaceWeatherSource() {
398         return spaceWeatherSource;
399     }
400 
401     /** Set Space Weather data source.
402      * @param spaceWeatherSource Space Weather data source
403      */
404     public void setSpaceWeatherSource(final String spaceWeatherSource) {
405         this.spaceWeatherSource = spaceWeatherSource;
406     }
407 
408     /** Get epoch of the Space Weather data.
409      * @return epoch of the Space Weather data
410      */
411     public AbsoluteDate getSpaceWeatherEpoch() {
412         return spaceWeatherEpoch;
413     }
414 
415     /** Set epoch of the Space Weather data.
416      * @param spaceWeatherEpoch epoch of the Space Weather data
417      */
418     public void setSpaceWeatherEpoch(final AbsoluteDate spaceWeatherEpoch) {
419         this.spaceWeatherEpoch = spaceWeatherEpoch;
420     }
421 
422     /** Get the interpolation method for Space Weather data.
423      * @return interpolation method for Space Weather data
424      */
425     public String getInterpMethodSW() {
426         return interpMethodSW;
427     }
428 
429     /** Set the interpolation method for Space Weather data.
430      * @param interpMethodSW interpolation method for Space Weather data
431      */
432     public void setInterpMethodSW(final String interpMethodSW) {
433         refuseFurtherComments();
434         this.interpMethodSW = interpMethodSW;
435     }
436 
437     /** Get fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ.
438      * @return fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ
439      */
440     public double getFixedGeomagneticKp() {
441         return fixedGeomagneticKp;
442     }
443 
444     /** Set fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ.
445      * @param fixedGeomagneticKp fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ
446      */
447     public void setFixedGeomagneticKp(final double fixedGeomagneticKp) {
448         this.fixedGeomagneticKp = fixedGeomagneticKp;
449     }
450 
451     /** Get fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ.
452      * @return fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ
453      */
454     public double getFixedGeomagneticAp() {
455         return fixedGeomagneticAp;
456     }
457 
458     /** Set fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ.
459      * @param fixedGeomagneticAp fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ
460      */
461     public void setFixedGeomagneticAp(final double fixedGeomagneticAp) {
462         this.fixedGeomagneticAp = fixedGeomagneticAp;
463     }
464 
465     /** Get fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst.
466      * @return fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst
467      */
468     public double getFixedGeomagneticDst() {
469         return fixedGeomagneticDst;
470     }
471 
472     /** Set fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst.
473      * @param fixedGeomagneticDst fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst
474      */
475     public void setFixedGeomagneticDst(final double fixedGeomagneticDst) {
476         this.fixedGeomagneticDst = fixedGeomagneticDst;
477     }
478 
479     /** Get fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7.
480      * @return fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7
481      */
482     public double getFixedF10P7() {
483         return fixedF10P7;
484     }
485 
486     /** Set fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7.
487      * @param fixedF10P7 fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7
488      */
489     public void setFixedF10P7(final double fixedF10P7) {
490         this.fixedF10P7 = fixedF10P7;
491     }
492 
493     /** Get fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7.
494      * @return fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7
495      */
496     public double getFixedF10P7Mean() {
497         return fixedF10P7Mean;
498     }
499 
500     /** Set fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7.
501      * @param fixedF10P7Mean fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7
502      */
503     public void setFixedF10P7Mean(final double fixedF10P7Mean) {
504         this.fixedF10P7Mean = fixedF10P7Mean;
505     }
506 
507     /** Get fixed (time invariant) value of the Solar Flux daily proxy M10.7.
508      * @return fixed (time invariant) value of the Solar Flux daily proxy M10.7
509      */
510     public double getFixedM10P7() {
511         return fixedM10P7;
512     }
513 
514     /** Set fixed (time invariant) value of the Solar Flux daily proxy M10.7.
515      * @param fixedM10P7 fixed (time invariant) value of the Solar Flux daily proxy M10.7
516      */
517     public void setFixedM10P7(final double fixedM10P7) {
518         this.fixedM10P7 = fixedM10P7;
519     }
520 
521     /** Get fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7.
522      * @return fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7
523      */
524     public double getFixedM10P7Mean() {
525         return fixedM10P7Mean;
526     }
527 
528     /** Set fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7.
529      * @param fixedM10P7Mean fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7
530      */
531     public void setFixedM10P7Mean(final double fixedM10P7Mean) {
532         this.fixedM10P7Mean = fixedM10P7Mean;
533     }
534 
535     /** Get fixed (time invariant) value of the Solar Flux daily proxy S10.7.
536      * @return fixed (time invariant) value of the Solar Flux daily proxy S10.7
537      */
538     public double getFixedS10P7() {
539         return fixedS10P7;
540     }
541 
542     /** Set fixed (time invariant) value of the Solar Flux daily proxy S10.7.
543      * @param fixedS10P7 fixed (time invariant) value of the Solar Flux daily proxy S10.7
544      */
545     public void setFixedS10P7(final double fixedS10P7) {
546         this.fixedS10P7 = fixedS10P7;
547     }
548 
549     /** Get fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7.
550      * @return fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7
551      */
552     public double getFixedS10P7Mean() {
553         return fixedS10P7Mean;
554     }
555 
556     /** Set fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7.
557      * @param fixedS10P7Mean fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7
558      */
559     public void setFixedS10P7Mean(final double fixedS10P7Mean) {
560         this.fixedS10P7Mean = fixedS10P7Mean;
561     }
562 
563     /** Get fixed (time invariant) value of the Solar Flux daily proxy Y10.7.
564      * @return fixed (time invariant) value of the Solar Flux daily proxy Y10.7
565      */
566     public double getFixedY10P7() {
567         return fixedY10P7;
568     }
569 
570     /** Set fixed (time invariant) value of the Solar Flux daily proxy Y10.7.
571      * @param fixedY10P7 fixed (time invariant) value of the Solar Flux daily proxy Y10.7
572      */
573     public void setFixedY10P7(final double fixedY10P7) {
574         this.fixedY10P7 = fixedY10P7;
575     }
576 
577     /** Get fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7.
578      * @return fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7
579      */
580     public double getFixedY10P7Mean() {
581         return fixedY10P7Mean;
582     }
583 
584     /** Set fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7.
585      * @param fixedY10P7Mean fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7
586      */
587     public void setFixedY10P7Mean(final double fixedY10P7Mean) {
588         this.fixedY10P7Mean = fixedY10P7Mean;
589     }
590 
591 }