1 /* Copyright 2002-2021 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.gnss.antenna;
18
19 import org.hipparchus.geometry.euclidean.threed.Vector3D;
20 import org.hipparchus.util.FastMath;
21
22 /**
23 * Pattern for GNSS antenna model on one frequency.
24 *
25 * @author Luc Maisonobe
26 * @since 9.2
27 * @see <a href="ftp://www.igs.org/pub/station/general/antex14.txt">ANTEX: The Antenna Exchange Format, Version 1.4</a>
28 *
29 */
30 public class FrequencyPattern {
31
32 /** Phase center eccentricities (m). */
33 private final Vector3D eccentricities;
34
35 /** Phase center variation function. */
36 private final PhaseCenterVariationFunction phaseCenterVariationFunction;
37
38 /** Simple constructor.
39 * @param eccentricities phase center eccentricities (m)
40 * @param phaseCenterVariationFunction phase center variation function
41 */
42 protected FrequencyPattern(final Vector3D eccentricities,
43 final PhaseCenterVariationFunction phaseCenterVariationFunction) {
44 this.eccentricities = eccentricities;
45 this.phaseCenterVariationFunction = phaseCenterVariationFunction;
46 }
47
48 /** Get the phase center eccentricities.
49 * @return phase center eccentricities (m)
50 */
51 public Vector3D getEccentricities() {
52 return eccentricities;
53 }
54
55 /** Get the value of the phase center variation in a signal direction.
56 * @param direction signal direction in antenna reference frame
57 * @return value of the phase center variation
58 */
59 public double getPhaseCenterVariation(final Vector3D direction) {
60 return phaseCenterVariationFunction.value(0.5 * FastMath.PI - direction.getDelta(),
61 direction.getAlpha());
62 }
63
64 }