1   /* Copyright 2022-2025 Luc Maisonobe
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.orbits;
18  
19  /** Container for one satellite slot in a {@link WalkerConstellation Walker constellation}.
20   * <p>
21   * The {@link #getSatellite()} satellite index for regular satellites is an integer,
22   * but it is allowed to have non-integer indices to create slots for in-orbit spare
23   * satellites between the regular satellites. As an example, one can consider a 24/3/1
24   * Walker constellation with 8 operational satellites in each of the 3 planes at satellites
25   * indices 0, 1, 2, 3, 4, 5, 6 and 7, and put for example 2 additional spares in each plane
26   * (hence having a total of 30 satellites), by affecting them to intermediate slots 0.5
27   * and 4.5.
28   * </p>
29   * @param <O> type of the orbit
30   * @author Luc Maisonobe
31   * @since 12.1
32   */
33  public class WalkerConstellationSlot<O extends Orbit> {
34  
35      /** Constellation. */
36      private final WalkerConstellation constellation;
37  
38      /** Index of the plane. */
39      private final int plane;
40  
41      /** Satellite index in plane. */
42      private final double satellite;
43  
44      /** Orbit. */
45      private final O orbit;
46  
47      /** Simple constructor.
48       * @param constellation constellation
49       * @param plane plane index
50       * @param satellite satellite index in plane
51       * @param orbit orbit
52       */
53      WalkerConstellationSlot(final WalkerConstellation constellation,
54                              final int plane, final double satellite, final O orbit) {
55          this.constellation = constellation;
56          this.plane         = plane;
57          this.satellite     = satellite;
58          this.orbit         = orbit;
59      }
60  
61      /** Get the constellation.
62       * @return constellation
63       */
64      public WalkerConstellation getConstellation() {
65          return constellation;
66      }
67  
68      /** Get the plane index.
69       * @return plane index
70       */
71      public int getPlane() {
72          return plane;
73      }
74  
75      /** Get the satellite index in plane.
76       * <p>
77       * Not that the index may be non-integer, for example to deal with
78       * in-orbit spare satellites
79       * </p>
80       * @return satellite index in plane
81       */
82      public double getSatellite() {
83          return satellite;
84      }
85  
86      /** Get the orbit.
87       * @return orbit
88       */
89      public O getOrbit() {
90          return orbit;
91      }
92  
93  }