1 /* Copyright 2022-2025 Thales Alenia Space
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.gnss;
18
19 import org.hipparchus.geometry.euclidean.threed.Rotation;
20 import org.orekit.estimation.measurements.EstimatedMeasurementBase;
21 import org.orekit.estimation.measurements.GroundStation;
22 import org.orekit.frames.Frame;
23 import org.orekit.utils.TimeStampedPVCoordinates;
24
25 /** Modifier for wind-up effect in GNSS {@link Phase phase measurements}.
26 * @see WindUpFactory
27 * @author Luc Maisonobe
28 * @since 10.1
29 */
30 public class WindUp extends AbstractWindUp<Phase> {
31
32 /** Simple constructor.
33 * <p>
34 * The constructor is package protected to enforce use of {@link WindUpFactory}
35 * and preserve phase continuity for successive measurements involving the same
36 * satellite/receiver pair.
37 * </p>
38 * @param emitter emitter dipole
39 */
40 WindUp(final Dipole emitter) {
41 super(emitter, Dipole.CANONICAL_I_J);
42 }
43
44 /** {@inheritDoc} */
45 @Override
46 protected Rotation emitterToInert(final EstimatedMeasurementBase<Phase> estimated) {
47 // we don't use the basic yaw steering attitude model from ESA navipedia page
48 // but rely on the attitude that was computed by the propagator, which takes
49 // into account the proper noon and midnight turns for each satellite model
50 return estimated.getStates()[0].toStaticTransform().getRotation().revert();
51 }
52
53 /** {@inheritDoc} */
54 @Override
55 protected Rotation receiverToInert(final EstimatedMeasurementBase<Phase> estimated) {
56 final TimeStampedPVCoordinates[] participants = estimated.getParticipants();
57 final Frame inertial = estimated.getStates()[0].getFrame();
58 final GroundStation station = estimated.getObservedMeasurement().getStation();
59 return station.getOffsetToInertial(inertial, participants[1].getDate(), false).getRotation();
60 }
61
62 }