IonosphereBDGIMMessage.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.files.rinex.navigation;

  18. import org.orekit.gnss.SatelliteSystem;

  19. /** Container for data contained in a ionosphere BDGIM message.
  20.  * @author Luc Maisonobe
  21.  * @since 12.0
  22.  */
  23. public class IonosphereBDGIMMessage extends IonosphereBaseMessage {

  24.     /** α (TECu). */
  25.     private final double[] alpha;

  26.     /** Simple constructor.
  27.      * @param system satellite system
  28.      * @param prn satellite number
  29.      * @param navigationMessageType navigation message type
  30.      */
  31.     public IonosphereBDGIMMessage(final SatelliteSystem system, final int prn, final String navigationMessageType) {
  32.         super(system, prn, navigationMessageType);
  33.         alpha = new double[9];
  34.     }

  35.     /** Get the α coefficients.
  36.      * <p>
  37.      * Beware Orekit uses SI units here.
  38.      * In order to retrieve the more traditional TECu, use
  39.      * {@code Unit.TOTAL_ELECTRON_CONTENT_UNIT.fromSI(msg.getAlpha()[i])}
  40.      * </p>
  41.      * @return α coefficients (m⁻²)
  42.      * @see org.orekit.utils.units.Unit#TOTAL_ELECTRON_CONTENT_UNIT
  43.      */
  44.     public double[] getAlpha() {
  45.         return alpha.clone();
  46.     }

  47.     /** Set one α coefficient.
  48.      * <p>
  49.      * Beware Orekit uses SI units here.
  50.      * In order to use the more traditional TECu, use
  51.      * {@code msg.setAlpha(i, Unit.TOTAL_ELECTRON_CONTENT_UNIT.toSI(ai))}
  52.      * </p>
  53.      * @param i index of the coefficient
  54.      * @param alphaI α coefficient to set (m⁻²)
  55.      * @see org.orekit.utils.units.Unit#TOTAL_ELECTRON_CONTENT_UNIT
  56.      */
  57.     public void setAlphaI(final int i, final double alphaI) {
  58.         alpha[i] = alphaI;
  59.     }

  60. }