GlobalMappingFunctionModel.java

  1. /* Copyright 2002-2025 CS GROUP
  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.models.earth.troposphere;

  18. import org.hipparchus.CalculusFieldElement;
  19. import org.hipparchus.Field;
  20. import org.hipparchus.util.FastMath;
  21. import org.hipparchus.util.FieldSinCos;
  22. import org.hipparchus.util.MathArrays;
  23. import org.hipparchus.util.MathUtils;
  24. import org.hipparchus.util.SinCos;
  25. import org.orekit.annotation.DefaultDataContext;
  26. import org.orekit.bodies.FieldGeodeticPoint;
  27. import org.orekit.bodies.GeodeticPoint;
  28. import org.orekit.data.DataContext;
  29. import org.orekit.time.AbsoluteDate;
  30. import org.orekit.time.FieldAbsoluteDate;
  31. import org.orekit.time.TimeScale;
  32. import org.orekit.utils.FieldLegendrePolynomials;
  33. import org.orekit.utils.FieldTrackingCoordinates;
  34. import org.orekit.utils.LegendrePolynomials;
  35. import org.orekit.utils.TrackingCoordinates;

  36. /** The Global Mapping Function  model for radio techniques.
  37.  *  This model is an empirical mapping function. It only needs the
  38.  *  values of the station latitude, longitude, height and the
  39.  *  date for the computations.
  40.  *  <p>
  41.  *  The Global Mapping Function is based on spherical harmonics up
  42.  *  to degree and order of 9. It was developed to be consistent
  43.  *  with the {@link ViennaOne Vienna1} mapping function model.
  44.  *  </p>
  45.  *
  46.  *  @see "Boehm, J., A.E. Niell, P. Tregoning, H. Schuh (2006),
  47.  *       Global Mapping Functions (GMF): A new empirical mapping function based
  48.  *       on numerical weather model data, Geoph. Res. Letters, Vol. 33, L07304,
  49.  *       doi:10.1029/2005GL025545."
  50.  *
  51.  *  @see "Petit, G. and Luzum, B. (eds.), IERS Conventions (2010),
  52.  *       IERS Technical Note No. 36, BKG (2010)"
  53.  *
  54.  *  @author Bryan Cazabonne
  55.  *
  56.  */
  57. public class GlobalMappingFunctionModel implements TroposphereMappingFunction {

  58.     /** Multiplication factor for mapping function coefficients. */
  59.     private static final double FACTOR = 1.0e-5;

  60.     /** UTC time scale. */
  61.     private final TimeScale utc;

  62.     /** Build a new instance.
  63.      *
  64.      * <p>This constructor uses the {@link DataContext#getDefault() default data context}.
  65.      *
  66.      * @see #GlobalMappingFunctionModel(TimeScale)
  67.      */
  68.     @DefaultDataContext
  69.     public GlobalMappingFunctionModel() {
  70.         this(DataContext.getDefault().getTimeScales().getUTC());
  71.     }

  72.     /** Build a new instance.
  73.      * @param utc UTC time scale.
  74.      * @since 10.1
  75.      */
  76.     public GlobalMappingFunctionModel(final TimeScale utc) {
  77.         this.utc = utc;
  78.     }

  79.     /** {@inheritDoc} */
  80.     @Override
  81.     public double[] mappingFactors(final TrackingCoordinates trackingCoordinates,
  82.                                    final GeodeticPoint point,
  83.                                    final AbsoluteDate date) {

  84.         // bh and ch constants (Boehm, J et al, 2006) | HYDROSTATIC PART
  85.         final double bh  = 0.0029;
  86.         final double c0h = 0.062;
  87.         final double c10h;
  88.         final double c11h;
  89.         final double psi;

  90.         // Latitude and longitude of the station
  91.         final double latitude  = point.getLatitude();
  92.         final double longitude = point.getLongitude();

  93.         if (FastMath.sin(latitude) > 0) {
  94.             // northern hemisphere case
  95.             c10h = 0.001;
  96.             c11h = 0.005;
  97.             psi  = 0.0;
  98.         } else {
  99.             // southern hemisphere case
  100.             c10h = 0.002;
  101.             c11h = 0.007;
  102.             psi  = FastMath.PI;
  103.         }

  104.         double t0 = 28;
  105.         if (latitude < 0) {
  106.             // southern hemisphere: t0 = 28 + an integer half of year
  107.             t0 += 183;
  108.         }
  109.         final double coef = psi + ((date.getDayOfYear(utc) + 1 - t0) / 365.25) * MathUtils.TWO_PI;
  110.         final double ch = c0h + ((FastMath.cos(coef) + 1) * (c11h / 2.0) + c10h) * (1.0 - FastMath.cos(latitude));

  111.         // bw and cw constants (Boehm, J et al, 2006) | WET PART
  112.         final double bw = 0.00146;
  113.         final double cw = 0.04391;

  114.         // Compute coefficients ah and aw with spherical harmonics Eq. 3 (Ref 1)

  115.         // Compute Legendre Polynomials Pnm(sin(phi))
  116.         final int degree = 9;
  117.         final int order  = 9;
  118.         final LegendrePolynomials p = new LegendrePolynomials(degree, order, FastMath.sin(latitude));

  119.         double a0Hydro   = 0.;
  120.         double amplHydro = 0.;
  121.         double a0Wet   = 0.;
  122.         double amplWet = 0.;
  123.         final ABCoefficients abCoef = new ABCoefficients();
  124.         int j = 0;
  125.         for (int n = 0; n <= 9; n++) {
  126.             for (int m = 0; m <= n; m++) {
  127.                 // Sine and cosine of m * longitude
  128.                 final SinCos sc = FastMath.sinCos(m * longitude);
  129.                 // Compute coefficients
  130.                 a0Hydro   = a0Hydro + (abCoef.getAHMean(j) * p.getPnm(n, m) * sc.cos() +
  131.                                        abCoef.getBHMean(j) * p.getPnm(n, m) * sc.sin()) * FACTOR;

  132.                 a0Wet     = a0Wet + (abCoef.getAWMean(j) * p.getPnm(n, m) * sc.cos() +
  133.                                      abCoef.getBWMean(j) * p.getPnm(n, m) * sc.sin()) * FACTOR;

  134.                 amplHydro = amplHydro + (abCoef.getAHAmplitude(j) * p.getPnm(n, m) * sc.cos() +
  135.                                          abCoef.getBHAmplitude(j) * p.getPnm(n, m) * sc.sin()) * FACTOR;

  136.                 amplWet   = amplWet + (abCoef.getAWAmplitude(j) * p.getPnm(n, m) * sc.cos() +
  137.                                        abCoef.getBWAmplitude(j) * p.getPnm(n, m) * sc.sin()) * FACTOR;

  138.                 j = j + 1;
  139.             }
  140.         }

  141.         // Eq. 2 (Ref 1)
  142.         final double ah = a0Hydro + amplHydro * FastMath.cos(coef - psi);
  143.         final double aw = a0Wet + amplWet * FastMath.cos(coef - psi);

  144.         final double[] function = new double[2];
  145.         function[0] = TroposphericModelUtils.mappingFunction(ah, bh, ch,
  146.                                                              trackingCoordinates.getElevation());
  147.         function[1] = TroposphericModelUtils.mappingFunction(aw, bw, cw,
  148.                                                              trackingCoordinates.getElevation());

  149.         // Apply height correction
  150.         final double correction = TroposphericModelUtils.computeHeightCorrection(trackingCoordinates.getElevation(),
  151.                                                                                  point.getAltitude());
  152.         function[0] = function[0] + correction;

  153.         return function;
  154.     }

  155.     /** {@inheritDoc} */
  156.     @Override
  157.     public <T extends CalculusFieldElement<T>> T[] mappingFactors(final FieldTrackingCoordinates<T> trackingCoordinates,
  158.                                                                   final FieldGeodeticPoint<T> point,
  159.                                                                   final FieldAbsoluteDate<T> date) {

  160.         final Field<T> field = date.getField();
  161.         final T zero = field.getZero();

  162.         // bh and ch constants (Boehm, J et al, 2006) | HYDROSTATIC PART
  163.         final T bh  = zero.newInstance(0.0029);
  164.         final T c0h = zero.newInstance(0.062);
  165.         final T c10h;
  166.         final T c11h;
  167.         final T psi;

  168.         // Latitude and longitude of the station
  169.         final T latitude  = point.getLatitude();
  170.         final T longitude = point.getLongitude();

  171.         // sin(latitude) > 0 -> northern hemisphere
  172.         if (FastMath.sin(latitude.getReal()) > 0) {
  173.             c10h = zero.newInstance(0.001);
  174.             c11h = zero.newInstance(0.005);
  175.             psi  = zero;
  176.         } else {
  177.             c10h = zero.newInstance(0.002);
  178.             c11h = zero.newInstance(0.007);
  179.             psi  = zero.getPi();
  180.         }

  181.         double t0 = 28;
  182.         if (latitude.getReal() < 0) {
  183.             // southern hemisphere: t0 = 28 + an integer half of year
  184.             t0 += 183;
  185.         }
  186.         final T coef = psi.add(date.getDayOfYear(utc).add(1 - t0).divide(365.25).multiply(MathUtils.TWO_PI));
  187.         final T ch = c11h.divide(2.0).multiply(FastMath.cos(coef).add(1.0)).add(c10h).multiply(FastMath.cos(latitude).negate().add(1.0)).add(c0h);

  188.         // bw and cw constants (Boehm, J et al, 2006) | WET PART
  189.         final T bw = zero.newInstance(0.00146);
  190.         final T cw = zero.newInstance(0.04391);

  191.         // Compute coefficients ah and aw with spherical harmonics Eq. 3 (Ref 1)

  192.         // Compute Legendre Polynomials Pnm(sin(phi))
  193.         final int degree = 9;
  194.         final int order  = 9;
  195.         final FieldLegendrePolynomials<T> p = new FieldLegendrePolynomials<>(degree, order, FastMath.sin(latitude));

  196.         T a0Hydro   = zero;
  197.         T amplHydro = zero;
  198.         T a0Wet     = zero;
  199.         T amplWet   = zero;
  200.         final ABCoefficients abCoef = new ABCoefficients();
  201.         int j = 0;
  202.         for (int n = 0; n <= 9; n++) {
  203.             for (int m = 0; m <= n; m++) {
  204.                 // Sine and cosine of m * longitude
  205.                 final FieldSinCos<T> sc = FastMath.sinCos(longitude.multiply(m));

  206.                 // Compute coefficients
  207.                 a0Hydro   = a0Hydro.add(p.getPnm(n, m).multiply(abCoef.getAHMean(j)).multiply(sc.cos()).
  208.                                     add(p.getPnm(n, m).multiply(abCoef.getBHMean(j)).multiply(sc.sin())).
  209.                                     multiply(FACTOR));

  210.                 a0Wet     = a0Wet.add(p.getPnm(n, m).multiply(abCoef.getAWMean(j)).multiply(sc.cos()).
  211.                                   add(p.getPnm(n, m).multiply(abCoef.getBWMean(j)).multiply(sc.sin())).
  212.                                   multiply(FACTOR));

  213.                 amplHydro = amplHydro.add(p.getPnm(n, m).multiply(abCoef.getAHAmplitude(j)).multiply(sc.cos()).
  214.                                       add(p.getPnm(n, m).multiply(abCoef.getBHAmplitude(j)).multiply(sc.sin())).
  215.                                       multiply(FACTOR));

  216.                 amplWet   = amplWet.add(p.getPnm(n, m).multiply(abCoef.getAWAmplitude(j)).multiply(sc.cos()).
  217.                                     add(p.getPnm(n, m).multiply(abCoef.getBWAmplitude(j)).multiply(sc.sin())).
  218.                                     multiply(FACTOR));

  219.                 j = j + 1;
  220.             }
  221.         }

  222.         // Eq. 2 (Ref 1)
  223.         final T ah = a0Hydro.add(amplHydro.multiply(FastMath.cos(coef.subtract(psi))));
  224.         final T aw = a0Wet.add(amplWet.multiply(FastMath.cos(coef.subtract(psi))));

  225.         final T[] function = MathArrays.buildArray(field, 2);
  226.         function[0] = TroposphericModelUtils.mappingFunction(ah, bh, ch,
  227.                                                              trackingCoordinates.getElevation());
  228.         function[1] = TroposphericModelUtils.mappingFunction(aw, bw, cw,
  229.                                                              trackingCoordinates.getElevation());

  230.         // Apply height correction
  231.         final T correction = TroposphericModelUtils.computeHeightCorrection(trackingCoordinates.getElevation(),
  232.                                                                             point.getAltitude(),
  233.                                                                             field);
  234.         function[0] = function[0].add(correction);

  235.         return function;
  236.     }

  237.     private static class ABCoefficients {

  238.         /** Mean hydrostatic coefficients a.*/
  239.         private static final double[] AH_MEAN = {
  240.             1.2517e02,
  241.             8.503e-01,
  242.             6.936e-02,
  243.             -6.760e+00,
  244.             1.771e-01,
  245.             1.130e-02,
  246.             5.963e-01,
  247.             1.808e-02,
  248.             2.801e-03,
  249.             -1.414e-03,
  250.             -1.212e+00,
  251.             9.300e-02,
  252.             3.683e-03,
  253.             1.095e-03,
  254.             4.671e-05,
  255.             3.959e-01,
  256.             -3.867e-02,
  257.             5.413e-03,
  258.             -5.289e-04,
  259.             3.229e-04,
  260.             2.067e-05,
  261.             3.000e-01,
  262.             2.031e-02,
  263.             5.900e-03,
  264.             4.573e-04,
  265.             -7.619e-05,
  266.             2.327e-06,
  267.             3.845e-06,
  268.             1.182e-01,
  269.             1.158e-02,
  270.             5.445e-03,
  271.             6.219e-05,
  272.             4.204e-06,
  273.             -2.093e-06,
  274.             1.540e-07,
  275.             -4.280e-08,
  276.             -4.751e-01,
  277.             -3.490e-02,
  278.             1.758e-03,
  279.             4.019e-04,
  280.             -2.799e-06,
  281.             -1.287e-06,
  282.             5.468e-07,
  283.             7.580e-08,
  284.             -6.300e-09,
  285.             -1.160e-01,
  286.             8.301e-03,
  287.             8.771e-04,
  288.             9.955e-05,
  289.             -1.718e-06,
  290.             -2.012e-06,
  291.             1.170e-08,
  292.             1.790e-08,
  293.             -1.300e-09,
  294.             1.000e-10
  295.         };

  296.         /** Mean hydrostatic coefficients b.*/
  297.         private static final double[] BH_MEAN = {
  298.             0.000e+00,
  299.             0.000e+00,
  300.             3.249e-02,
  301.             0.000e+00,
  302.             3.324e-02,
  303.             1.850e-02,
  304.             0.000e+00,
  305.             -1.115e-01,
  306.             2.519e-02,
  307.             4.923e-03,
  308.             0.000e+00,
  309.             2.737e-02,
  310.             1.595e-02,
  311.             -7.332e-04,
  312.             1.933e-04,
  313.             0.000e+00,
  314.             -4.796e-02,
  315.             6.381e-03,
  316.             -1.599e-04,
  317.             -3.685e-04,
  318.             1.815e-05,
  319.             0.000e+00,
  320.             7.033e-02,
  321.             2.426e-03,
  322.             -1.111e-03,
  323.             -1.357e-04,
  324.             -7.828e-06,
  325.             2.547e-06,
  326.             0.000e+00,
  327.             5.779e-03,
  328.             3.133e-03,
  329.             -5.312e-04,
  330.             -2.028e-05,
  331.             2.323e-07,
  332.             -9.100e-08,
  333.             -1.650e-08,
  334.             0.000e+00,
  335.             3.688e-02,
  336.             -8.638e-04,
  337.             -8.514e-05,
  338.             -2.828e-05,
  339.             5.403e-07,
  340.             4.390e-07,
  341.             1.350e-08,
  342.             1.800e-09,
  343.             0.000e+00,
  344.             -2.736e-02,
  345.             -2.977e-04,
  346.             8.113e-05,
  347.             2.329e-07,
  348.             8.451e-07,
  349.             4.490e-08,
  350.             -8.100e-09,
  351.             -1.500e-09,
  352.             2.000e-10
  353.         };

  354.         /** Amplitude for hydrostatic coefficients a.*/
  355.         private static final double[] AH_AMPL = {
  356.             -2.738e-01,
  357.             -2.837e+00,
  358.             1.298e-02,
  359.             -3.588e-01,
  360.             2.413e-02,
  361.             3.427e-02,
  362.             -7.624e-01,
  363.             7.272e-02,
  364.             2.160e-02,
  365.             -3.385e-03,
  366.             4.424e-01,
  367.             3.722e-02,
  368.             2.195e-02,
  369.             -1.503e-03,
  370.             2.426e-04,
  371.             3.013e-01,
  372.             5.762e-02,
  373.             1.019e-02,
  374.             -4.476e-04,
  375.             6.790e-05,
  376.             3.227e-05,
  377.             3.123e-01,
  378.             -3.535e-02,
  379.             4.840e-03,
  380.             3.025e-06,
  381.             -4.363e-05,
  382.             2.854e-07,
  383.             -1.286e-06,
  384.             -6.725e-01,
  385.             -3.730e-02,
  386.             8.964e-04,
  387.             1.399e-04,
  388.             -3.990e-06,
  389.             7.431e-06,
  390.             -2.796e-07,
  391.             -1.601e-07,
  392.             4.068e-02,
  393.             -1.352e-02,
  394.             7.282e-04,
  395.             9.594e-05,
  396.             2.070e-06,
  397.             -9.620e-08,
  398.             -2.742e-07,
  399.             -6.370e-08,
  400.             -6.300e-09,
  401.             8.625e-02,
  402.             -5.971e-03,
  403.             4.705e-04,
  404.             2.335e-05,
  405.             4.226e-06,
  406.             2.475e-07,
  407.             -8.850e-08,
  408.             -3.600e-08,
  409.             -2.900e-09,
  410.             0.000e+00
  411.         };

  412.         /** Amplitude for hydrostatic coefficients b.*/
  413.         private static final double[] BH_AMPL = {
  414.             0.000e+00,
  415.             0.000e+00,
  416.             -1.136e-01,
  417.             0.000e+00,
  418.             -1.868e-01,
  419.             -1.399e-02,
  420.             0.000e+00,
  421.             -1.043e-01,
  422.             1.175e-02,
  423.             -2.240e-03,
  424.             0.000e+00,
  425.             -3.222e-02,
  426.             1.333e-02,
  427.             -2.647e-03,
  428.             -2.316e-05,
  429.             0.000e+00,
  430.             5.339e-02,
  431.             1.107e-02,
  432.             -3.116e-03,
  433.             -1.079e-04,
  434.             -1.299e-05,
  435.             0.000e+00,
  436.             4.861e-03,
  437.             8.891e-03,
  438.             -6.448e-04,
  439.             -1.279e-05,
  440.             6.358e-06,
  441.             -1.417e-07,
  442.             0.000e+00,
  443.             3.041e-02,
  444.             1.150e-03,
  445.             -8.743e-04,
  446.             -2.781e-05,
  447.             6.367e-07,
  448.             -1.140e-08,
  449.             -4.200e-08,
  450.             0.000e+00,
  451.             -2.982e-02,
  452.             -3.000e-03,
  453.             1.394e-05,
  454.             -3.290e-05,
  455.             -1.705e-07,
  456.             7.440e-08,
  457.             2.720e-08,
  458.             -6.600e-09,
  459.             0.000e+00,
  460.             1.236e-02,
  461.             -9.981e-04,
  462.             -3.792e-05,
  463.             -1.355e-05,
  464.             1.162e-06,
  465.             -1.789e-07,
  466.             1.470e-08,
  467.             -2.400e-09,
  468.             -4.000e-10
  469.         };

  470.         /** Mean wet coefficients a.*/
  471.         private static final double[] AW_MEAN = {
  472.             5.640e+01,
  473.             1.555e+00,
  474.             -1.011e+00,
  475.             -3.975e+00,
  476.             3.171e-02,
  477.             1.065e-01,
  478.             6.175e-01,
  479.             1.376e-01,
  480.             4.229e-02,
  481.             3.028e-03,
  482.             1.688e+00,
  483.             -1.692e-01,
  484.             5.478e-02,
  485.             2.473e-02,
  486.             6.059e-04,
  487.             2.278e+00,
  488.             6.614e-03,
  489.             -3.505e-04,
  490.             -6.697e-03,
  491.             8.402e-04,
  492.             7.033e-04,
  493.             -3.236e+00,
  494.             2.184e-01,
  495.             -4.611e-02,
  496.             -1.613e-02,
  497.             -1.604e-03,
  498.             5.420e-05,
  499.             7.922e-05,
  500.             -2.711e-01,
  501.             -4.406e-01,
  502.             -3.376e-02,
  503.             -2.801e-03,
  504.             -4.090e-04,
  505.             -2.056e-05,
  506.             6.894e-06,
  507.             2.317e-06,
  508.             1.941e+00,
  509.             -2.562e-01,
  510.             1.598e-02,
  511.             5.449e-03,
  512.             3.544e-04,
  513.             1.148e-05,
  514.             7.503e-06,
  515.             -5.667e-07,
  516.             -3.660e-08,
  517.             8.683e-01,
  518.             -5.931e-02,
  519.             -1.864e-03,
  520.             -1.277e-04,
  521.             2.029e-04,
  522.             1.269e-05,
  523.             1.629e-06,
  524.             9.660e-08,
  525.             -1.015e-07,
  526.             -5.000e-10
  527.         };

  528.         /** Mean wet coefficients b.*/
  529.         private static final double[] BW_MEAN = {
  530.             0.000e+00,
  531.             0.000e+00,
  532.             2.592e-01,
  533.             0.000e+00,
  534.             2.974e-02,
  535.             -5.471e-01,
  536.             0.000e+00,
  537.             -5.926e-01,
  538.             -1.030e-01,
  539.             -1.567e-02,
  540.             0.000e+00,
  541.             1.710e-01,
  542.             9.025e-02,
  543.             2.689e-02,
  544.             2.243e-03,
  545.             0.000e+00,
  546.             3.439e-01,
  547.             2.402e-02,
  548.             5.410e-03,
  549.             1.601e-03,
  550.             9.669e-05,
  551.             0.000e+00,
  552.             9.502e-02,
  553.             -3.063e-02,
  554.             -1.055e-03,
  555.             -1.067e-04,
  556.             -1.130e-04,
  557.             2.124e-05,
  558.             0.000e+00,
  559.             -3.129e-01,
  560.             8.463e-03,
  561.             2.253e-04,
  562.             7.413e-05,
  563.             -9.376e-05,
  564.             -1.606e-06,
  565.             2.060e-06,
  566.             0.000e+00,
  567.             2.739e-01,
  568.             1.167e-03,
  569.             -2.246e-05,
  570.             -1.287e-04,
  571.             -2.438e-05,
  572.             -7.561e-07,
  573.             1.158e-06,
  574.             4.950e-08,
  575.             0.000e+00,
  576.             -1.344e-01,
  577.             5.342e-03,
  578.             3.775e-04,
  579.             -6.756e-05,
  580.             -1.686e-06,
  581.             -1.184e-06,
  582.             2.768e-07,
  583.             2.730e-08,
  584.             5.700e-09
  585.         };

  586.         /** Amplitude for wet coefficients a.*/
  587.         private static final double[] AW_AMPL = {
  588.             1.023e-01,
  589.             -2.695e+00,
  590.             3.417e-01,
  591.             -1.405e-01,
  592.             3.175e-01,
  593.             2.116e-01,
  594.             3.536e+00,
  595.             -1.505e-01,
  596.             -1.660e-02,
  597.             2.967e-02,
  598.             3.819e-01,
  599.             -1.695e-01,
  600.             -7.444e-02,
  601.             7.409e-03,
  602.             -6.262e-03,
  603.             -1.836e+00,
  604.             -1.759e-02,
  605.             -6.256e-02,
  606.             -2.371e-03,
  607.             7.947e-04,
  608.             1.501e-04,
  609.             -8.603e-01,
  610.             -1.360e-01,
  611.             -3.629e-02,
  612.             -3.706e-03,
  613.             -2.976e-04,
  614.             1.857e-05,
  615.             3.021e-05,
  616.             2.248e+00,
  617.             -1.178e-01,
  618.             1.255e-02,
  619.             1.134e-03,
  620.             -2.161e-04,
  621.             -5.817e-06,
  622.             8.836e-07,
  623.             -1.769e-07,
  624.             7.313e-01,
  625.             -1.188e-01,
  626.             1.145e-02,
  627.             1.011e-03,
  628.             1.083e-04,
  629.             2.570e-06,
  630.             -2.140e-06,
  631.             -5.710e-08,
  632.             2.000e-08,
  633.             -1.632e+00,
  634.             -6.948e-03,
  635.             -3.893e-03,
  636.             8.592e-04,
  637.             7.577e-05,
  638.             4.539e-06,
  639.             -3.852e-07,
  640.             -2.213e-07,
  641.             -1.370e-08,
  642.             5.800e-09
  643.         };

  644.         /** Amplitude for wet coefficients b.*/
  645.         private static final double[] BW_AMPL = {
  646.             0.000e+00,
  647.             0.000e+00,
  648.             -8.865e-02,
  649.             0.000e+00,
  650.             -4.309e-01,
  651.             6.340e-02,
  652.             0.000e+00,
  653.             1.162e-01,
  654.             6.176e-02,
  655.             -4.234e-03,
  656.             0.000e+00,
  657.             2.530e-01,
  658.             4.017e-02,
  659.             -6.204e-03,
  660.             4.977e-03,
  661.             0.000e+00,
  662.             -1.737e-01,
  663.             -5.638e-03,
  664.             1.488e-04,
  665.             4.857e-04,
  666.             -1.809e-04,
  667.             0.000e+00,
  668.             -1.514e-01,
  669.             -1.685e-02,
  670.             5.333e-03,
  671.             -7.611e-05,
  672.             2.394e-05,
  673.             8.195e-06,
  674.             0.000e+00,
  675.             9.326e-02,
  676.             -1.275e-02,
  677.             -3.071e-04,
  678.             5.374e-05,
  679.             -3.391e-05,
  680.             -7.436e-06,
  681.             6.747e-07,
  682.             0.000e+00,
  683.             -8.637e-02,
  684.             -3.807e-03,
  685.             -6.833e-04,
  686.             -3.861e-05,
  687.             -2.268e-05,
  688.             1.454e-06,
  689.             3.860e-07,
  690.             -1.068e-07,
  691.             0.000e+00,
  692.             -2.658e-02,
  693.             -1.947e-03,
  694.             7.131e-04,
  695.             -3.506e-05,
  696.             1.885e-07,
  697.             5.792e-07,
  698.             3.990e-08,
  699.             2.000e-08,
  700.             -5.700e-09
  701.         };

  702.         /** Build a new instance. */
  703.         ABCoefficients() {

  704.         }

  705.         /** Get the value of the mean hydrostatique coefficient ah for the given index.
  706.          * @param index index
  707.          * @return the mean hydrostatique coefficient ah for the given index
  708.          */
  709.         public double getAHMean(final int index) {
  710.             return AH_MEAN[index];
  711.         }

  712.         /** Get the value of the mean hydrostatique coefficient bh for the given index.
  713.          * @param index index
  714.          * @return the mean hydrostatique coefficient bh for the given index
  715.          */
  716.         public double getBHMean(final int index) {
  717.             return BH_MEAN[index];
  718.         }

  719.         /** Get the value of the mean wet coefficient aw for the given index.
  720.          * @param index index
  721.          * @return the mean wet coefficient aw for the given index
  722.          */
  723.         public double getAWMean(final int index) {
  724.             return AW_MEAN[index];
  725.         }

  726.         /** Get the value of the mean wet coefficient bw for the given index.
  727.          * @param index index
  728.          * @return the mean wet coefficient bw for the given index
  729.          */
  730.         public double getBWMean(final int index) {
  731.             return BW_MEAN[index];
  732.         }

  733.         /** Get the value of the amplitude of the hydrostatique coefficient ah for the given index.
  734.          * @param index index
  735.          * @return the amplitude of the hydrostatique coefficient ah for the given index
  736.          */
  737.         public double getAHAmplitude(final int index) {
  738.             return AH_AMPL[index];
  739.         }

  740.         /** Get the value of the amplitude of the hydrostatique coefficient bh for the given index.
  741.          * @param index index
  742.          * @return the amplitude of the hydrostatique coefficient bh for the given index
  743.          */
  744.         public double getBHAmplitude(final int index) {
  745.             return BH_AMPL[index];
  746.         }

  747.         /** Get the value of the amplitude of the wet coefficient aw for the given index.
  748.          * @param index index
  749.          * @return the amplitude of the wet coefficient aw for the given index
  750.          */
  751.         public double getAWAmplitude(final int index) {
  752.             return AW_AMPL[index];
  753.         }

  754.         /** Get the value of the amplitude of the wet coefficient bw for the given index.
  755.          * @param index index
  756.          * @return the amplitude of the wet coefficient bw for the given index
  757.          */
  758.         public double getBWAmplitude(final int index) {
  759.             return BW_AMPL[index];
  760.         }
  761.     }
  762. }