FixedPanel.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. /** Class representing one panel of a satellite, fixed with respect to satellite body.
  24.  * <p>
  25.  * It is mainly used to represent one facet of the body of the satellite.
  26.  * </p>
  27.  *
  28.  * @author Luc Maisonobe
  29.  * @since 3.0
  30.  */
  31. public class FixedPanel extends Panel {

  32.     /** Unit Normal vector, pointing outward. */
  33.     private final Vector3D normal;

  34.     /** Simple constructor.
  35.      * <p>
  36.      * As the sum of absorption coefficient, specular reflection coefficient and
  37.      * diffuse reflection coefficient is exactly 1, only the first two coefficients
  38.      * are needed here, the third one is deduced from the other ones.
  39.      * </p>
  40.      * @param normal vector normal to the panel in spacecraft frame, pointing outward (will be normalized)
  41.      * @param area panel area in m²
  42.      * @param doubleSided if true, the panel is double-sided (typically solar arrays),
  43.      * otherwise it is the side of a box and only relevant for flux coming from its
  44.      * positive normal
  45.      * @param drag drag coefficient
  46.      * @param liftRatio drag lift ratio (proportion between 0 and 1 of atmosphere modecules
  47.      * that will experience specular reflection when hitting spacecraft instead
  48.      * of experiencing diffuse reflection, hence producing lift)
  49.      * @param absorption radiation pressure absorption coefficient (between 0 and 1)
  50.      * @param reflection radiation pressure specular reflection coefficient (between 0 and 1)
  51.      */
  52.     public FixedPanel(final Vector3D normal, final double area, final boolean doubleSided,
  53.                       final double drag, final double liftRatio,
  54.                       final double absorption, final double reflection) {
  55.         super(area, doubleSided, drag, liftRatio, absorption, reflection);
  56.         this.normal = normal.normalize();
  57.     }

  58.     /** {@inheritDoc} */
  59.     @Override
  60.     public Vector3D getNormal(final SpacecraftState state) {
  61.         return normal;
  62.     }

  63.     /** {@inheritDoc} */
  64.     @Override
  65.     public <T extends CalculusFieldElement<T>> FieldVector3D<T> getNormal(final FieldSpacecraftState<T> state) {
  66.         return new FieldVector3D<>(state.getDate().getField(), normal);
  67.     }

  68. }