1 /* Copyright 2002-2026 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.estimation.measurements.generation;
18
19 import java.util.Map;
20
21 import org.orekit.estimation.measurements.AngularRaDec;
22 import org.orekit.estimation.measurements.GroundStation;
23 import org.orekit.estimation.measurements.MeasurementQuality;
24 import org.orekit.estimation.measurements.ObservableSatellite;
25 import org.orekit.estimation.measurements.Observer;
26 import org.orekit.frames.Frame;
27 import org.orekit.propagation.sampling.OrekitStepInterpolator;
28 import org.orekit.signal.SignalTravelTimeModel;
29 import org.orekit.time.AbsoluteDate;
30
31 /** Builder for {@link AngularRaDec} measurements.
32 * @author Luc Maisonobe
33 * @since 9.3
34 */
35 public class AngularRaDecBuilder extends AbstractSignalBasedBuilder<AngularRaDec> {
36
37 /** Sensor. */
38 private final Observer observer;
39
40 /** Reference frame in which the right ascension - declination angles are given. */
41 private final Frame referenceFrame;
42
43 /** Simple constructor.
44 * @param station ground station from which measurement is performed
45 * @param referenceFrame Reference frame in which the right ascension - declination angles are given
46 * @param sigma theoretical standard deviation
47 * @param baseWeight base weight
48 * @param satellite satellite related to this builder
49 */
50 public AngularRaDecBuilder(final GroundStation station,
51 final Frame referenceFrame, final double[] sigma, final double[] baseWeight,
52 final ObservableSatellite satellite) {
53 this(station, referenceFrame, new MeasurementQuality(sigma, baseWeight), new SignalTravelTimeModel(), satellite);
54 }
55
56 /** Simple constructor.
57 * @param observer sensor from which measurement is performed
58 * @param referenceFrame Reference frame in which the right ascension - declination angles are given
59 * @param measurementQuality measurement quality as used in estimation (in Orekit, the crossed-terms
60 * of the covariance matrix are only used by Kalman filters, not least squares)
61 * @param signalTravelTimeModel signal travel time model
62 * @param satellite satellite related to this builder
63 * @since 14.0
64 */
65 public AngularRaDecBuilder(final Observer observer,
66 final Frame referenceFrame, final MeasurementQuality measurementQuality,
67 final SignalTravelTimeModel signalTravelTimeModel, final ObservableSatellite satellite) {
68 super(measurementQuality, signalTravelTimeModel, satellite);
69 this.observer = observer;
70 this.referenceFrame = referenceFrame;
71 }
72
73 /**
74 * Getter for the observer.
75 * @return observer
76 * @since 14.0
77 */
78 public Observer getObserver() {
79 return observer;
80 }
81
82 /** {@inheritDoc} */
83 @Override
84 protected AngularRaDec buildObserved(final AbsoluteDate date,
85 final Map<ObservableSatellite, OrekitStepInterpolator> interpolators) {
86 return new AngularRaDec(observer, referenceFrame, date, new double[2], getMeasurementQuality(),
87 getSignalTravelTimeModel(), getSatellites()[0]);
88 }
89
90 }