Panel.java

  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.forces;

  18. import org.hipparchus.CalculusFieldElement;
  19. import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
  20. import org.hipparchus.geometry.euclidean.threed.Vector3D;
  21. import org.orekit.propagation.FieldSpacecraftState;
  22. import org.orekit.propagation.SpacecraftState;

  23. /** Base class representing one panel of a satellite.
  24.  * @see FixedPanel
  25.  * @see PointingPanel
  26.  * @see SlewingPanel
  27.  * @author Luc Maisonobe
  28.  * @since 3.0
  29.  */
  30. public abstract class Panel {

  31.     /** Area in m². */
  32.     private final double area;

  33.     /** Indicator for double-sided panels (typically solar arrays). */
  34.     private final boolean doubleSided;

  35.     /** Drag coefficient. */
  36.     private final double drag;

  37.     /** Drag lift ratio. */
  38.     private final double liftRatio;

  39.     /** Radiation pressure absorption coefficient. */
  40.     private final double absorption;

  41.     /** Radiation pressure specular reflection coefficient. */
  42.     private final double reflection;

  43.     /** Simple constructor.
  44.      * <p>
  45.      * As the sum of absorption coefficient, specular reflection coefficient and
  46.      * diffuse reflection coefficient is exactly 1, only the first two coefficients
  47.      * are needed here, the third one is deduced from the other ones.
  48.      * </p>
  49.      * @param area panel area in m²
  50.      * @param doubleSided if true, the panel is double-sided (typically solar arrays),
  51.      * otherwise it is the side of a box and only relevant for flux coming from its
  52.      * positive normal
  53.      * @param drag drag coefficient
  54.      * @param liftRatio drag lift ratio (proportion between 0 and 1 of atmosphere modecules
  55.      * that will experience specular reflection when hitting spacecraft instead
  56.      * of experiencing diffuse reflection, hence producing lift)
  57.      * @param absorption radiation pressure absorption coefficient (between 0 and 1)
  58.      * @param reflection radiation pressure specular reflection coefficient (between 0 and 1)
  59.      */
  60.     protected Panel(final double area, final boolean doubleSided,
  61.                     final double drag, final double liftRatio,
  62.                     final double absorption, final double reflection) {
  63.         this.area        = area;
  64.         this.doubleSided = doubleSided;
  65.         this.drag        = drag;
  66.         this.liftRatio   = liftRatio;
  67.         this.absorption  = absorption;
  68.         this.reflection  = reflection;
  69.     }

  70.     /** Get panel area.
  71.      * @return panel area
  72.      */
  73.     public double getArea() {
  74.         return area;
  75.     }

  76.     /** Check if the panel is double-sided (typically solar arrays).
  77.      * @return true if panel is double-sided
  78.      */
  79.     public boolean isDoubleSided() {
  80.         return doubleSided;
  81.     }

  82.     /** Get drag coefficient.
  83.      * @return drag coefficient
  84.      */
  85.     public double getDrag() {
  86.         return drag;
  87.     }

  88.     /** Get drag lift ratio.
  89.      * @return drag lift ratio
  90.      */
  91.     public double getLiftRatio() {
  92.         return liftRatio;
  93.     }

  94.     /** Get radiation pressure absorption coefficient.
  95.      * @return radiation pressure absorption coefficient
  96.      */
  97.     public double getAbsorption() {
  98.         return absorption;
  99.     }

  100.     /** Get radiation pressure specular reflection coefficient.
  101.      * @return radiation pressure specular reflection coefficient
  102.      */
  103.     public double getReflection() {
  104.         return reflection;
  105.     }

  106.     /** Get panel normal in spacecraft frame.
  107.      * @param state current spacecraft state
  108.      * @return panel normal in spacecraft frame
  109.      */
  110.     public abstract Vector3D getNormal(SpacecraftState state);

  111.     /** Get panel normal in spacecraft frame.
  112.      * @param <T> type of the field elements
  113.      * @param state current spacecraft state
  114.      * @return panel normal in spacecraft frame
  115.      */
  116.     public abstract <T extends CalculusFieldElement<T>> FieldVector3D<T> getNormal(FieldSpacecraftState<T> state);

  117. }