1   /* Copyright 2002-2022 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.estimation;
18  
19  import org.orekit.forces.ForceModel;
20  import org.orekit.forces.drag.DragForce;
21  import org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel;
22  import org.orekit.forces.gravity.OceanTides;
23  import org.orekit.forces.gravity.Relativity;
24  import org.orekit.forces.gravity.SolidTides;
25  import org.orekit.forces.gravity.ThirdBodyAttraction;
26  import org.orekit.forces.radiation.SolarRadiationPressure;
27  import org.orekit.models.earth.atmosphere.HarrisPriester;
28  
29  public enum Force {
30  
31      POTENTIAL() {
32          public ForceModel getForceModel(Context context) {
33              return new HolmesFeatherstoneAttractionModel(context.earth.getBodyFrame(), context.gravity);
34          }
35      },
36  
37      THIRD_BODY_SUN() {
38          public ForceModel getForceModel(Context context) {
39              return new ThirdBodyAttraction(context.sun);
40          }
41      },
42  
43      THIRD_BODY_MOON() {
44          public ForceModel getForceModel(Context context) {
45              return new ThirdBodyAttraction(context.moon);
46          }
47      },
48  
49      DRAG() {
50          public ForceModel getForceModel(Context context) {
51              return new DragForce(new HarrisPriester(context.sun, context.earth), context.dragSensitive);
52          }
53      },
54  
55      SOLAR_RADIATION_PRESSURE() {
56          public ForceModel getForceModel(Context context) {
57              return new SolarRadiationPressure(context.sun, context.earth.getEquatorialRadius(),
58                                                context.radiationSensitive);
59          }
60      },
61  
62      OCEAN_TIDES() {
63          public ForceModel getForceModel(Context context) {
64              return new OceanTides(context.earth.getBodyFrame(), context.gravity.getAe(), context.gravity.getMu(),
65                                    7, 7, context.conventions, context.ut1);
66          }
67      },
68  
69      SOLID_TIDES() {
70          public ForceModel getForceModel(Context context) {
71              return new SolidTides(context.earth.getBodyFrame(), context.gravity.getAe(), context.gravity.getMu(),
72                                    context.gravity.getTideSystem(),
73                                    context.conventions, context.ut1, context.sun, context.moon);
74          }
75      },
76  
77      RELATIVITY() {
78          public ForceModel getForceModel(Context context) {
79              return new Relativity(context.gravity.getMu());
80          }
81      };
82  
83      public abstract ForceModel getForceModel(Context context);
84  
85  }