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  
19  import org.hipparchus.CalculusFieldElement;
20  import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
21  import org.hipparchus.geometry.euclidean.threed.Vector3D;
22  import org.orekit.propagation.FieldSpacecraftState;
23  import org.orekit.propagation.SpacecraftState;
24  
25  /** Class representing one panel of a satellite, fixed with respect to satellite body.
26   * <p>
27   * It is mainly used to represent one facet of the body of the satellite.
28   * </p>
29   *
30   * @author Luc Maisonobe
31   * @since 3.0
32   */
33  public class FixedPanel extends Panel {
34  
35      /** Unit Normal vector, pointing outward. */
36      private final Vector3D normal;
37  
38      /** Simple constructor.
39       * <p>
40       * As the sum of absorption coefficient, specular reflection coefficient and
41       * diffuse reflection coefficient is exactly 1, only the first two coefficients
42       * are needed here, the third one is deduced from the other ones.
43       * </p>
44       * @param normal vector normal to the panel in spacecraft frame, pointing outward (will be normalized)
45       * @param area panel area in m²
46       * @param doubleSided if true, the panel is double-sided (typically solar arrays),
47       * otherwise it is the side of a box and only relevant for flux coming from its
48       * positive normal
49       * @param drag drag coefficient
50       * @param liftRatio drag lift ratio (proportion between 0 and 1 of atmosphere modecules
51       * that will experience specular reflection when hitting spacecraft instead
52       * of experiencing diffuse reflection, hence producing lift)
53       * @param absorption radiation pressure absorption coefficient (between 0 and 1)
54       * @param reflection radiation pressure specular reflection coefficient (between 0 and 1)
55       */
56      public FixedPanel(final Vector3D normal, final double area, final boolean doubleSided,
57                        final double drag, final double liftRatio,
58                        final double absorption, final double reflection) {
59          super(area, doubleSided, drag, liftRatio, absorption, reflection);
60          this.normal = normal.normalize();
61      }
62  
63      /** {@inheritDoc} */
64      @Override
65      public Vector3D getNormal(final SpacecraftState state) {
66          return normal;
67      }
68  
69      /** {@inheritDoc} */
70      @Override
71      public <T extends CalculusFieldElement<T>> FieldVector3D<T> getNormal(final FieldSpacecraftState<T> state) {
72          return new FieldVector3D<>(state.getDate().getField(), normal);
73      }
74  
75  }