WalkerConstellationSlot.java

  1. /* Copyright 2002-2024 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. /** Container for one satellite slot in a {@link WalkerConstellation Walker constellation}.
  19.  * <p>
  20.  * The {@link #getSatellite()} satellite index for regular satellites is an integer,
  21.  * but it is allowed to have non-integer indices to create slots for in-orbit spare
  22.  * satellites between the regular satellites. As an example, one can consider a 24/3/1
  23.  * Walker constellation with 8 operational satellites in each of the 3 planes at satellites
  24.  * indices 0, 1, 2, 3, 4, 5, 6 and 7, and put for example 2 additional spares in each plane
  25.  * (hence having a total of 30 satellites), by affecting them to intermediate slots 0.5
  26.  * and 4.5.
  27.  * </p>
  28.  * @param <O> type of the orbit
  29.  * @author Luc Maisonobe
  30.  * @since 12.1
  31.  */
  32. public class WalkerConstellationSlot<O extends Orbit> {

  33.     /** Constellation. */
  34.     private final WalkerConstellation constellation;

  35.     /** Index of the plane. */
  36.     private final int plane;

  37.     /** Satellite index in plane. */
  38.     private final double satellite;

  39.     /** Orbit. */
  40.     private final O orbit;

  41.     /** Simple constructor.
  42.      * @param constellation constellation
  43.      * @param plane plane index
  44.      * @param satellite satellite index in plane
  45.      * @param orbit orbit
  46.      */
  47.     WalkerConstellationSlot(final WalkerConstellation constellation,
  48.                             final int plane, final double satellite, final O orbit) {
  49.         this.constellation = constellation;
  50.         this.plane         = plane;
  51.         this.satellite     = satellite;
  52.         this.orbit         = orbit;
  53.     }

  54.     /** Get the constellation.
  55.      * @return constellation
  56.      */
  57.     public WalkerConstellation getConstellation() {
  58.         return constellation;
  59.     }

  60.     /** Get the plane index.
  61.      * @return plane index
  62.      */
  63.     public int getPlane() {
  64.         return plane;
  65.     }

  66.     /** Get the satellite index in plane.
  67.      * <p>
  68.      * Not that the index may be non-integer, for example to deal with
  69.      * in-orbit spare satellites
  70.      * </p>
  71.      * @return satellite index in plane
  72.      */
  73.     public double getSatellite() {
  74.         return satellite;
  75.     }

  76.     /** Get the orbit.
  77.      * @return orbit
  78.      */
  79.     public O getOrbit() {
  80.         return orbit;
  81.     }

  82. }